Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In Gadget Development, you set the name of a flyout file by using;
System.Gadget.Flyout.file = "somefile.html";

In Gadget Development, you can use the following to display a dialog e.g. for testing purposes;
window.prompt("some text","some more text");

Any idea why the follow will not work?
var something = System.Gadget.Flyout.file;
window.prompt(something,"some more text");

or
window.prompt(System.Gadget.Flyout.file,"some more text");


I see no reason for it failing as .file is a string. Note: I have also tried using .file.toString(), but that also fails.

No errors are thrown by the Gadget being developed, and only indications are code doesn't execute as expected.

It must be that obvious that i am missing the problem :doh:

[MSDN System.Gadget.Flyout object specs; http://msdn.microsoft.com/en-us/library/ff486195(v=VS.85).aspx[^]]
Posted
Updated 17-Jan-11 19:14pm
v3
Comments
Manfred Rudolf Bihy 17-Jan-11 15:33pm    
What do you mean exactly by saying "it fails"? Please feel free to elaborate a bit: Error messages, description of perceived misbehavior or malfunction.

1 solution

Looks like I found a possible cause of the problem: http://msdn.microsoft.com/en-us/library/ms723664(VS.85).aspx[^]

A little bit down on that site it says this:

Bugs exposed by this property:
Windows Vista and Windows 7: ** NOTE ** THIS PROPERTY IS ACTUALLY WRITE-ONLY. IF YOU ATTEMPT TO GET ITS VALUE, AN ERROR WILL BE THROWN.


So eventhough the documentation tells us the property is read/write there seems to be a bug under Vista and Weven that makes it write only.

I hope that explains your problem.

Best Regards,
Manfred
 
Share this answer
 
v2
Comments
Espen Harlinn 17-Jan-11 15:48pm    
5+ Seems like this has been known since 11/19/2009, any guess about why they haven't gotten around to fixing it?
Manfred Rudolf Bihy 17-Jan-11 17:15pm    
My best guess is that since you're the one that's supposed to stick the value in there you don't need to read it back to know what it is. You can even consider it a feature as it keeps people from abusing the property as data container. :)
DaveAuld 18-Jan-11 1:43am    
However, if you are using multiple flyouts, you might want to read what is the current 'active' flyout.
DaveAuld 18-Jan-11 1:16am    
Thanks Manfred, that looks like a confirmed bug, and the specification isn't functioning as intended.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900