Koda

Welcome to Koda bug tracker!

At the moment you can post bugreports or suggestions anonymously. But registered users have some benefits: attaching files, commenting, voting, tracking tasks e.t.c.

Due some asshole started spamming tracker, now (at least for some time) it’s not allowed to create anonymous tasks. Sorry for unconvenience.

In edit fields you can use DokuWiki syntax for formatting.

Tasklist

FS#292 - Form styles: Code generation error

Attached to Project: Koda
Opened by Chris Haslam (c.haslam) - Wednesday, 25 May 2011, 21:13 GMT+3
Type Bug Report
Category Application
Status Unconfirmed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version Development
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Style 94C8 0000 generates $WS_SYSMENU,$WS_POPUP. It should generate $WS_POPUPWINDOW, $WS_CAPTION.

This task depends upon

Comment by Martin Gibson (martin) - Monday, 30 May 2011, 20:36 GMT+3

There are some other problems with form styles. I you have WS_CAPTION checked it doesn't mean that you will get that style in the AutoIt code. I find it difficalt to get the form style to include a caption and a border if I don't want the minimize and maximize buttons for example.

Comment by Chris Haslam (c.haslam) - Tuesday, 31 May 2011, 08:36 GMT+3

I have been trying to understand the oddities of GuiCreate (thanks to Microsoft!)

I am attaching a zip file which contains:

  • Analysis of Form Styles, a spreadsheet, as a PDF, and the original Quattro Pro file (My Excel doesn't seem to have bitwise operators for cell formulas.
  • Test Form styles.au3, the script I modified many times to provide data for the spreadsheet
  • Styles with Presets suggestion.au3, both a test-bed and a suggestion for a dialog that might replace the Styles and exStyles tabs for Form.
  • Styles with Presets suggestion.kxf: generates GUI code in the .au3 file

I think that Styles with Presets suggestion.au3 is fairly bug-free. Please see the long comment at the start of the file for how I see handling Form styles. This file may be helpful to Lazycat in further developing Koda using Delphi. My approach tells the user what will work, and allows him to see the results of his own experimentation before he clicks on OK.

Comment by Chris Haslam (c.haslam) - Tuesday, 31 May 2011, 16:31 GMT+3

I updated attachment

Further updates are possible. Please ask if any are available.

Sorry I can't delete the first version from this task.

Comment by Chris Haslam (c.haslam) - Wednesday, 01 June 2011, 20:24 GMT+3

GUI and code have been reorganized and expanded in scope, thanks in part to new discoveries. Please ask for latest version.

The approach is to concede that it is impossible to offer all of the WS and WS_EX constants and ensure that the generated code will work. So Presets are guaranteed to work but the user is also welcome to experiment. The test form that is generated by the dialog shows whether he succeeded or not.

In his experimentation, he will usually not have to search through MSDN to find out what the constants mean because the dialog has checkboxes with brief descriptions rather than constants.

Comment by Admin (Lazycat) - Thursday, 09 June 2011, 13:05 GMT+3

Great work, Chris! Surely, your "safe" presets can be used as default form presets for Koda.

About descriptions: I already thought before about showing descriptions of styles (short or even extended) when mouse is over styles in editor (now it's show only value). This can be probably done, but need to decide where to keep those descriptions - in current language file or separate one(s).

Comment by Chris Haslam (c.haslam) - Thursday, 09 June 2011, 18:14 GMT+3

Attached is the latest version of my suggestion. I have tested it quite thoroughly, but testing by the author is not the best way! Do read the readme.

For those who love Windows constants (I don't!), there could be an option to show Windows constants rather than descriptions. Some Windows constants seem to do the opposite of what their names indicate!

Localizing looks like a significant issue.

Comment by Chris Haslam (c.haslam) - Thursday, 09 June 2011, 22:10 GMT+3

My script shows the Windows constants as hints, and shows Windows constants in the list boxes.

MSDN's description of some Windows constants is not as clear as it might be (and in a few cases, the requires appears to be wrong.

I am wondering whether the approach I took would also be useful for styles for controls. Mostly the normal styles don't need descriptions (but a few do), but many exStyles which apply to Form also apply to controls.

Comment by Admin (Lazycat) - Friday, 10 June 2011, 10:04 GMT+3

Thanks, even better!

Localizing looks like a significant issue.

Nope, since every style have unique name. Just need to decide where to place all definitions.

I am wondering whether the approach I took would also be useful for styles for controls. Mostly the normal styles don't need descriptions (but a few do), but many exStyles which apply to Form also apply to controls.

I'm imagine presets in a bit different way. But since form is most tricky and messed thing, I think is nothing wrong if we will have your dialog as some sort of "Wizard".

But in order to add it for other controls, dialog and it's logic should be generalized.

Comment by Chris Haslam (c.haslam) - Friday, 10 June 2011, 19:03 GMT+3
But in order to add it for other controls, dialog and its logic should be generalized.

I will think about it. I may start with creating a dialog for a few specific controls, to gain experience and to try to see how to generalize.

I can see my dialog as a kind of Wizard.

Loading...