Messenger Plus! Live Forums » Messenger Plus! Live Extension » Scripting » Interface Writer | [release] 2.0 | 07/11/2009

Pages: (6): « First « 2 3 4 5 [ 6 ] Last » Reply 
Interface Writer | [release] 2.0 | 07/11/2009
Author: Message:
CookieRevised
Elite Member
Beta Tester
Translator
*****

Avatar
mininana, badger, nanaphone creator

Posts: 13497
Reputation: 170
32 / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: Interface Writer | [release] 2.0 | 07/11/2009
quote:
Originally posted by whiz
quote:
Originally posted by mynetx
Use a system dialog for opening and saving files. This allows easy selection of files without having to know their names.  You can find more information about Common Dialogs at MSDN.
JScript code:
cd = new ActiveXObject("MSComDlg.CommonDialog"); // create the object
cd.Filter = "All Files(*.*)|*.*|JScript Files(*.js)|*.js"; // set file filter
cd.FilterIndex = 2;
cd.MaxFileSize = 128; // must set MaxFileSize. otherwise you will get an error
cd.ShowOpen(); // show it to user
file = cd.FileName; // retrieve file + path
if (!file) { // If the user does enter file exit
    MsgPlus.DisplayToast("", "You must enter a file name");
}
else {
    MsgPlus.DisplayToast("", "The user selected:\n" + file );
}


I've just tested that, but it doesn't seem to work on initialization:
code:
From the Script Debugger
Script is starting
Error: unknown (code: -2147221230)
       File: FnInitialization.js. Line: 1.
Script has failed to start
Something wrong with the ActiveX object?
Yes, you do not have the proper design license.
I strongly suggest not to use that ActiveX, but instead use the proper Windows API.
See: CookieRevised's reply to UserAccounts.CommonDialog alternative for Vista

and "cd = " should be "var cd ="

Also (@mynetx):
quote:
cd.MaxFileSize = 128; // must set MaxFileSize. otherwise you will get an error
128 is waaaaaaaay to low. The MaxFileSize is the maximum path length, this should at least be 260, like it is defined in Windows (=MAXPATH). So, a value like 2048 should be given on current systems.





quote:
Originally posted by whiz
quote:
Originally posted by mynetx
  • Remove the help tooltip from the ListView listing all Controls/elements. The tooltip is needed for hovering ellipsed items in the grid.

Removed.  But what do you mean by "ellipsed items"?  Do you mean a tooltip for each window/control/element with extra details?
Ellipsed items are items which are too long to be displayed on one line. As such, the are cropped and "..." (an ellipsis) is added to the end. With default Windows behaviour, when you hover over such items a tooltip will pop up showing the complete line.

However, that does not mean you should not display a tooltip when items do fit in the available space. Common practice is to always show a tooltip when hovering over items (too long or not), when at least one item is too long to be displayed.



;)

This post was edited on 11-07-2009 at 05:47 PM by CookieRevised.
11-07-2009 05:43 PM
Profile PM Find Quote Report
mynetx
Skinning Contest Winner
Beta Tester
*****

Avatar
Windows Live Enhanced

Posts: 931
Reputation: 33
22 / Male / Flag
Joined: Jul 2007
RE: Interface Writer | [release] 2.0 | 07/11/2009
quote:
Originally posted by whiz
Something wrong with the ActiveX object?
Here it works.  What Windows version are you using?
quote:
Originally posted by whiz
what do you mean by "ellipsed items"?
Look.  The red items have tooltips automatically as they don’t show completely. My suggestion: Give the window a larger default size. (Good that it is resizable!)

[Image: 2ujnqfd.jpg]

And, why does
XML code:
<Position ClientWidth="210" ClientHeight="224" InitialPos="CenteredScreen"/>

not show up as Size in the Window properties dialog?
11-07-2009 06:28 PM
Profile PM Web Find Quote Report
CookieRevised
Elite Member
Beta Tester
Translator
*****

Avatar
mininana, badger, nanaphone creator

Posts: 13497
Reputation: 170
32 / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: Interface Writer | [release] 2.0 | 07/11/2009
quote:
Originally posted by mynetx
quote:
Originally posted by whiz
Something wrong with the ActiveX object?
Here it works.  What Windows version are you using?
Windows version doesn't matter, see my previous post.

;)
11-07-2009 11:07 PM
Profile PM Find Quote Report
whiz
Full Member
***

Avatar
Currently... scripting.

Posts: 160
– / Male / Flag
Joined: Nov 2008
RE: Interface Writer | [release] 2.0 | 07/11/2009
quote:
Originally posted by CookieRevised
I strongly suggest not to use that ActiveX, but instead use the proper Windows API.
See: CookieRevised's reply to UserAccounts.CommonDialog alternative for Vista
Done.

quote:
Originally posted by CookieRevised
Ellipsed items are items which are too long to be displayed on one line. As such, the are cropped and "..." (an ellipsis) is added to the end. With default Windows behaviour, when you hover over such items a tooltip will pop up showing the complete line.

However, that does not mean you should not display a tooltip when items do fit in the available space. Common practice is to always show a tooltip when hovering over items (too long or not), when at least one item is too long to be displayed.
So... how do I add a tooltip for each item?
11-08-2009 11:57 AM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
Beta Tester
Translator
*****

Avatar
mininana, badger, nanaphone creator

Posts: 13497
Reputation: 170
32 / Male / Flag
Joined: Jul 2003
Status: Away
RE: Interface Writer | [release] 2.0 | 07/11/2009
Try to avoid tooltips to begin with.. aka make the list columns wider.
11-08-2009 05:56 PM
Profile PM Find Quote Report
whiz
Full Member
***

Avatar
Currently... scripting.

Posts: 160
– / Male / Flag
Joined: Nov 2008
RE: Interface Writer | [release] 2.0 | 07/11/2009
quote:
Originally posted by CookieRevised
Try to avoid tooltips to begin with.. aka make the list columns wider.
That's what I'm doing at the moment...  except I've added a few extra columns for some new features, so it's quite a long window now...  :P
11-09-2009 06:52 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
Beta Tester
Translator
*****

Avatar
mininana, badger, nanaphone creator

Posts: 13497
Reputation: 170
32 / Male / Flag
Joined: Jul 2003
Status: Away
RE: Interface Writer | [release] 2.0 | 07/11/2009
Cool, then you could also make the window a bit taller too, to compensate the widthness/wideness/whatever-ness :p. But remember that netbooks get popular these days, they have a small resolution, so stay well below 1024x600 ;) (1024 because of 1024x768 screens, and 600 because of 1080x600 screens)


This post was edited on 11-10-2009 at 08:08 AM by CookieRevised.
11-10-2009 07:45 AM
Profile PM Find Quote Report
whiz
Full Member
***

Avatar
Currently... scripting.

Posts: 160
– / Male / Flag
Joined: Nov 2008
RE: Interface Writer | [release] 2.0 | 07/11/2009
quote:
Originally posted by CookieRevised
Cool, then you could also make the window a bit taller too, to compensate the widthness/wideness/whatever-ness :p. But remember that netbooks get popular these days, they have a small resolution, so stay well below 1024x600 ;) (1024 because of 1024x768 screens, and 600 because of 1080x600 screens)
The window's now about 600x400., but I've left the minimum sizes, so it can be smaller if the user wants it to be.  I've also decided just to show the basic information in the main window now.  :P

And if anyone's interested, the new version will support window templates (DialogTmpl, WindowTmpl and ChildTmpl), window initial positions and custom attributes.  :D
11-10-2009 04:14 PM
Profile E-Mail PM Web Find Quote Report
Pages: (6): « First « 2 3 4 5 [ 6 ] Last »
« Next Oldest Return to Top Next Newest »
Reply 


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On