I have a script that loops through modules, within a project folder. However, I noticed that it only loops through open modules of the folder. If I start opening up, the results are unpredictable, it seems that the dxl is processing modules backwards, with the most recent one being first. |
Re: Dxl looping only through open modules? For an example look at https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14289511� |
Re: Dxl looping only through open modules?
Huh?
Module mod
string NameMod
Skip skpMods = createSting() // KEY: 'string' NameMod(base); DATA: 'Module' handle
print "Module found order..."
for mod in database do
{ NameMod = name(mod) // the 'fullName(mod)' would include the path info
print "\t" NameMod
put(skpMods, NameMod, mod) // Put the name as Key.
} // end for open modules in the Database
print "\n"
// loop through Key-sorted Skip, which is Alpha since the key is the 'name' -
print "Module from Skip order..."
for mod in skpMods do // Skips loop through the DATA -
{ NameMod = (string key skpMods) // Retrieve the KEY (name) associated with this DATA mod
print "\t" NameMod
if (!isVisible(mod)) continue
if (!isEdit(mod) continue
ProcessOpenEditModule(mod) // << you write this function
} // end for open modules in the Skip
print "\n"
delete(skpMods)
|
Re: Dxl looping only through open modules? llandale - Sun Mar 07 14:54:40 EST 2010
Huh?
Module mod
string NameMod
Skip skpMods = createSting() // KEY: 'string' NameMod(base); DATA: 'Module' handle
print "Module found order..."
for mod in database do
{ NameMod = name(mod) // the 'fullName(mod)' would include the path info
print "\t" NameMod
put(skpMods, NameMod, mod) // Put the name as Key.
} // end for open modules in the Database
print "\n"
// loop through Key-sorted Skip, which is Alpha since the key is the 'name' -
print "Module from Skip order..."
for mod in skpMods do // Skips loop through the DATA -
{ NameMod = (string key skpMods) // Retrieve the KEY (name) associated with this DATA mod
print "\t" NameMod
if (!isVisible(mod)) continue
if (!isEdit(mod) continue
ProcessOpenEditModule(mod) // << you write this function
} // end for open modules in the Skip
print "\n"
delete(skpMods)
Might want to put in an if there to make sure you only get formal modules :) if (type mod == "Formal") then put(skpMods, NameMod, mod) // Put only formal modules in the list, the name as Key.
|
Re: Dxl looping only through open modules? SystemAdmin - Sat Mar 06 11:16:51 EST 2010 |
Re: Dxl looping only through open modules? SystemAdmin - Mon Mar 22 10:53:36 EDT 2010 |