Jump to content

Koda 'Update Script' - not working


doudou
 Share

Recommended Posts

After update to v. 1.7.0.1 Koda does not find its own generated GUI sections in AU3 scripts anymore.

Example:

1. Save following as Test.kxf

<?xml version="1.0" encoding="windows-1251"?>
<object type="TAForm" name="Form2">
    <properties>
        <property name="Left" vt="Int16">302</property>
        <property name="Top" vt="Int16">218</property>
        <property name="Width" vt="Int16">420</property>
        <property name="Height" vt="Int16">331</property>
        <property name="Caption" vt="String">Form</property>
        <property name="Color" vt="Ident">clBtnFace</property>
        <property name="Font.Charset" vt="Ident">DEFAULT_CHARSET</property>
        <property name="Font.Color" vt="Ident">clWindowText</property>
        <property name="Font.Height" vt="Int8">-11</property>
        <property name="Font.Name" vt="String">MS Sans Serif</property>
        <property name="Font.Style" vt="Set"/>
        <property name="OldCreateOrder" vt="False">False</property>
        <property name="Visible" vt="True">True</property>
        <property name="Style" vt="Int32">-1798701056</property>
        <property name="ExStyle" vt="Int16">256</property>
        <property name="Version" vt="String">1.03</property>
        <property name="Description" vt="String">A standard Windows Form.</property>
        <property name="FormOptIndentChar" vt="Int8">1</property>
        <property name="FormOptIndentCount" vt="Int8">4</property>
        <property name="FormOptVarScope" vt="Int8">1</property>
        <property name="PixelsPerInch" vt="Int8">96</property>
        <property name="TextHeight" vt="Int8">13</property>
    </properties>
    <components/>
</object>

2. Save this as TestKD.au3

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=Test.kxf
Global $Form2 = GUICreate("Form2", 413, 298, 303, 219)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

3. Open TestKD.au3 in Koda

4. Change something

5. Choose Tools -> Update Script

In v. 1.7.0.1 (and all subsequent Betas) you will always get the error message:

'Can't find current form section in script. Probably you accidentally removed it's identificator. No script was updated!'

Edited by doudou

UDFS & Apps:

Spoiler

DDEML.au3 - DDE Client + Server
Localization.au3 - localize your scripts
TLI.au3 - type information on COM objects (TLBINF emulation)
TLBAutoEnum.au3 - auto-import of COM constants (enums)
AU3Automation - export AU3 scripts via COM interfaces
TypeLibInspector - OleView was yesterday

Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ 

Link to comment
Share on other sites

Koda usually posts the full path name where the KXF file is saved.

Well, this is just not true - the AU3 code above is generated by Koda itself. Besides I have dozens of scripts with Koda sections like that and they all worked as before Koda v. 1.7.0.1.

Release notes say:

Release 1.7.0.1 (2007-10-08)

2007-09-24 - Fixed: setting form modified flag for different events (align etc)

2007-09-24 - Fixed: hiding main form's title, when user have taskbar on top/left (thanks LongBowNZ, martin)

2007-09-19 - Changed: no more exception messagebox when typing wrong control name

2007-09-19 - Fixed: exception messages not hide behind forms anymore

2007-09-19 - Fixed: finding script, when form name in script is relative and form opened via drag'n'drop

2007-09-19 - Added: expanding in strings standard macro as well (@TAB, @CR, @LF, @CRLF, remain coming)

2007-09-19 - Fixed: expandng variables for menu items

2007-09-13 - Fixed: Au3toKoda: parsing controls with leading spaces (thanks JohnBailey)

I cannot see anything like 'relative paths not supported' here but the very opposite (s. bold line).

Edited by doudou

UDFS & Apps:

Spoiler

DDEML.au3 - DDE Client + Server
Localization.au3 - localize your scripts
TLI.au3 - type information on COM objects (TLBINF emulation)
TLBAutoEnum.au3 - auto-import of COM constants (enums)
AU3Automation - export AU3 scripts via COM interfaces
TypeLibInspector - OleView was yesterday

Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ 

Link to comment
Share on other sites

I don't know where the problem, your example work for me. I'm tried to open it via association, with d'n'd and via "Open" command. Every time I'm made a change in the form and updating it. All work fine. I'm tried with latest beta, try it, maybe something was fixed, though I'm not recall any changes was made in this area since 1.7.0.1.

Edit: only one thought - maybe you tried to open some really ancient script? Form ID string was changed once, but this was ages ago.

Edited by Lazycat
Link to comment
Share on other sites

I don't know where the problem, your example work for me. I'm tried to open it via association, with d'n'd and via "Open" command. Every time I'm made a change in the form and updating it. All work fine. I'm tried with latest beta, try it, maybe something was fixed, though I'm not recall any changes was made in this area since 1.7.0.1.

The problem is that relative form path does work ONLY if you open KXF file in Koda like this:

KD.exe Test.kxf

but not this way:

KD.exe TestKD.au3

In latter case Koda recognizes and opens the right KXF file but is not able to write changes back to the script. This is however rather the usual way to open a form while working with script (especially when there are multiple dialogs involved) and this used to work upto ver. 1.7.0.1.

Edit: only one thought - maybe you tried to open some really ancient script? Form ID string was changed once, but this was ages ago.

Negative, as I said both example files are generated by Koda 1.7.0.1.

Try to save KXF as Form2.kxf (and not Test.kxf).

I had some problems with forms where form internal name was different then KXF filename.

Even if this would change something (which it doesn't) it would be yet not quite usable in daily work and presumably still a bug.

UDFS & Apps:

Spoiler

DDEML.au3 - DDE Client + Server
Localization.au3 - localize your scripts
TLI.au3 - type information on COM objects (TLBINF emulation)
TLBAutoEnum.au3 - auto-import of COM constants (enums)
AU3Automation - export AU3 scripts via COM interfaces
TypeLibInspector - OleView was yesterday

Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ 

Link to comment
Share on other sites

Sorry, I'm read first post inattentive... This is definitely bug. Fixed for next beta :)

Thx. Looking forward :P

UDFS & Apps:

Spoiler

DDEML.au3 - DDE Client + Server
Localization.au3 - localize your scripts
TLI.au3 - type information on COM objects (TLBINF emulation)
TLBAutoEnum.au3 - auto-import of COM constants (enums)
AU3Automation - export AU3 scripts via COM interfaces
TypeLibInspector - OleView was yesterday

Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...