Cannot trigger macro when clicking on a shape any more (powerpoint) - powerpoint

I have attached a macro to a shape with a simple hello world message. It did work a few days ago then now it doesn't work any more in the same ppt file.
Any reason and how to restore normal behavior ?

Related

Injecting VBA As Text Into A PowerPoint Presentation

I think the answer to this will be "no" but it doesn't hurt to ask - and get people thinking.
I'd like to be able to programmatically add VBA as a text string to a PowerPoint presentation I'm creating with python-pptx.
I know I can confect the XML to create a button that, when clicked, runs a macro that already exists in the .pptm file.
Because the macro is stored compiled I don't think I can inject it as text programmatically. (I checked the format of a .pptm file with a "Hello World" macro in and there is an extra file in it with non-text material in.)
I also don't know if I can write a .pptm (macro-enabled .pptx) file with python-pptx.
So, Has anyone experimented with this?
The best I think I might be able to do - in md2pptx - is allow the user to add buttons that call pre-existing macros in the template file when clicked on. Unless the user builds their own template file off one I supply I don't think that enables me to add general function (such as deleting the first slide or note taking).

Changing size image in Oracle window and problem with Script Output

I have some aesthetic problems in Oracle SQL Developer.
First is moving the Script Output window. It seems to me it could have been moved on screen area. But some time I kinda moved the window somewhere and now I can't move it.
Second matter is that images moved from files explorer are unfitted to my preferences (I mean dimensions). Is here remaining solution is only to resize images in Paint and then moving to Oracle? Maybe these things are nothing for you but I can't stand mess on my screen.
Third screenshot showing my curiousal but annoying problem related with 2nd question. As you can see - the scale of this image is too high. I'd like to have whole image on some not too big area. But now I have bad-scaled image
You can't move the Script panel around, however the images looks like you're moving the SQL Worksheet, which contains the script output.
You can do that. IF you want to make it look 'all normal' or reset to the default desktop layout, use the Window menu, and choose this -
'Reset Windows to Factory Settings' - this refers to the SQL Developer windowing layout, not your OS, so it's safe.
SQL Developer UI will disappear, and repaint after a moment or two, hopefully back to 'normal.'
I'm sorry, I don't understand your 2nd question re: preferences and paint...

Matlab GUI Attempt to reference field of non-structure array

I have a GUI menu on Matlab with 4 buttons (menu.fig). Then I have 4 .fig file that I want to open when I click on the buttons. Here it's all ok, when I open a .fig from menu and insert value to do a plot I get this error:
???? Attempt to reference field of non-structure array.
If I try to open 1.fig directly, everything works perfectly.
I read that the problem is with eval(), but I can't solve it.
I changed the variable names on each .fig file
One 1.fig:
function pbutton1_Callback(hObject, eventdata, handles)
A1=get(handles.edtSAmp,'String');
f1=get(handles.edtSFreq, 'String');
fi1=get(handles.edtSFase, 'String');
t1=get(handles.popTipo, 'Value');
A1=str2double(A1);
f1=str2double(f1);
fi=str2double(fi1);
SinalSinusoidal(A1,f1,fi,t1);
I got the error on the that 1st line.
I guess this is something MATLAB GUI not handled well. I know it used to work, but when you tweaking your UI or UI related code a bit and accidentally you modified some area MATLAB told you not to touch, this kind of issue begin to happen.
The workaournd is to start the GUI from M editor by clicking run
I know it works, but originally, when I directly lauch it , it works too. so, this is not the end of it, people are just not getting to the end of it.
The problem is with probably with handles1. It's not a structure array like you expect it to be. In GUI's created with GUIDE, this variable is usually called handles, if you have both handles and handles1 make sure handles1 contains handles to the objects in the figure. If you're using handles1 only, make sure you're initializing it properly.

Matlab GUI gives error, but m file okaz

I`m absolutely new in Matlab, so I think it is a dumb question, but I would be really grateful for any help.
I had made a GUI with some slider. When I compile the m file everything works fine, there are no exceptions and the program do what it have to, but when I click on the fig file directly and try to move one of the sliders I got the following error:
??? Undefined function or method 'diference_GUI' for input arguments of type 'char'.
Error in ==>#(hObject,eventdata)diference_GUI('slider1_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
I had found some forum, blog article in this topic, but I want able to solve. Try-Catch not good, because if I do it, I dont get any error message, but the program still don`t do what it need.
Thank you for your help, Karoly
Your question isn't quite clear, but I'm assuming that you've made a GUI called difference_GUI using GUIDE in MATLAB.
When you do this, you'll get two files, difference_GUI.m and difference_GUI.fig. At that point, you should basically leave difference_GUI.fig alone, without opening or modifying it. Start the GUI by typing difference_GUI, which will run the .m file, which uses the information in the .fig file to lay out the GUI.
If you need to modify the layout of a GUI that you've created in GUIDE, you can open the project again in GUIDE and make minor modifications to it, such as repositioning a slider - but if you need to make major changes to it, I personally find it easier to copy the algorithmic portion out of the .m file, create an entirely new project, relaid out, from scratch, and then paste the algorithmic portion back in to the new .m file.

Could the notebook StyleSheet change the code behaviour?

I'd like to ask if someone had such a problem before. I have version 8.01, on windows 7, 64 bit. SP1.
I have been trying to find why I get Mathematica kernel crash when I added a Tooltip[] command to some code I am writing.
The notebook has the Wolfram Demonstration Style sheet (the Example style sheet which one uses to make demonstrations from). It is a Manipulate, all in one cell.
When I copy the code into a new notebook with default style sheet, the crash goes away! I can't reproduce the crash in the new notebook.
No code change at all. Just copied the whole cell and pasted it in a new notebook. Only difference is one has the Demonstration style sheet, and one is the default style sheet. When I change the stype sheet of the new notebook to Demostration, I notice the Tooltip does not work as well as before. When I use the Example notebook in this style, the minute I start moving the mouse with the toolstip, Kernel crashes.
To make sure, I did this few times. Same result. Once I add the Tooltip[], kernel crash right away only when the style sheet is demonstration.
My question: Has anyone seen such a behavior? I can make the two notebooks available if that is ok.
The crash I get is:
Problem signature:
Problem Event Name: BEX64
Application Name: Mathematica.exe
Application Version: 8.0.31.32201
Application Timestamp: 4d65e0e8
Fault Module Name: StackHash_2766
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Offset: 0000000000000001
Exception Code: c0000005
Exception Data: 0000000000000008
OS Version: 6.1.7601.2.1.0.768.3
Locale ID: 1033
Additional Information 1: 2766
Additional Information 2: 2766660d255034f6e73a8cd527b6f51e
Additional Information 3: 8ab7
Additional Information 4: 8ab74987ae95fade363a8e7256e3890f
I did send a bug report to WRI.
My question is: Has anyone had such a problem where a Style sheet change can make the code behave differently? Why would style sheet change cause such a problem?
Update 1:
I was able to make small example that shows part of the problem. I am working on making another small example that shows the crash itself. But this example below shows the problem, which is that Tooltip do not work the same when the style sheet is demonstration. First, here is a screen shot, side by side, same code, the left is in default style sheet, and the right is in Demonstration style
(below the image, I paste the source code, with steps how to reproduce the problem)
Manipulate[
EventHandler[Dynamic[Graphics[
{
Circle[{0,0},1],
Dynamic#Tooltip[Text[Style["O",Red,16] ,pt],Style[pt]]
},
ImageSize->250, PlotRange->{{-1,1},{-1,1}}
],ContinuousAction->True],
"MouseDragged":>
( pt=MousePosition["Graphics"] )
],
{{pt,{0,0}},ControlType->None},
TrackedSymbols:> {None},
ContinuousAction->True
]
steps:
Paste the above code in new style sheet, style default. Drag the point, you should see the coordinates display all the time, as you drag the point with the mouse.
File->New->Demonstration, and paste the same code in the Manipulate cell there replacing small template already there.
Now do the same, drag the point. You will see that the tooltip DO NOT display as the mouse is dragged. it only displays when holding the mouse steady over the point.
there is different behavior in dynamics that seems to cause this, or something else in this style.
I tried different style sheets, and the tooltip works ok there. only with Demonstration style sheet I get this problem with the tooltip.
If someone has a solution to this, it will be great. As I'd like to use tooltip in a demo.
I'll try to make an example that causes the crash also.
Update:
I've got back respsonce from WRI technical support. It is a Style sheet issue. Meanwhile, as a work around this is the suggestion From tech support:
I was able to reproduce the kernel crash. It looks like a demonstration
stylesheet issue related to imagesize fit.
At the top of the demonstration notebook there is tab called 'Tools',
clicking on it gives you an option called 'Resize Notebook to Fit'. On
resizing the notebook and saving it the kernel crash does not happen.
Thanks to WRI tech support.
update dec 2 2011
Based on John Fultz answer below, I am closing this question now. Thanks John.
(This answer is actually due to John Fultz -- see the comments under the original question. I'm turning it into an answer so that this question stops showing up on the unanswered-questions list. Clearly it's actually John who deserves any reputation points for this; John, if you post an answer here then I'll vote it up and delete mine.)
The reason why your tooltip isn't appearing in the demonstration version is that the Demonstration stylesheet puts a nonzero delay on tooltips, so that they only appear after hovering over them for a certain length of time. In particular, this means that they won't appear while dragging.
You can reverse this by setting the delay to zero on your Manipulate; do this by adding the following option to the Manipulate call.
BaseStyle -> {TooltipBoxOptions -> {TooltipDelay->0}}

Resources