View previous topic :: View next topic |
Author |
Message |
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Thu Apr 21, 2011 7:34 pm Post subject: Any reason why my DSU will not work after compiled? |
|
|
This dsu will not compile from an include call in a DSC script.
#include controlsample.dsu does not work.
#include controlsample.dsc works fine.
Any reason?
Code: |
#define command,controlsample
#define function,controlsample
:controlsample
if @equal(%1,add)
goto controlsamplecheckcontroladdtype
end
if @equal(%1,update)
goto controlsampleupdate
end
if @equal(%1,value)
goto controlsamplegetvalue
end
if @equal(%1,window)
goto controlsamplegetwindow
end
:controlsamplecheckcontroladdtype
if @equal(%2,controlsample)
goto controlsampleadd
end
:controlsampleadd
dialog create,%3,%5,%6,%7,%8,,notitle,class controlsample
dialog add,text,controlsamplewindow,0,0,0,0
dialog add,text,controlsamplemainwindow,0,0,0,0
dialog add,button,buttonGetDircontrolsample,20,20,@diff(@dlgpos(,w),100),20,Select Directory
dialog add,edit,editShowDircontrolsample,40,20,@diff(@dlgpos(,w),100),@diff(@dlgpos(,h),80),,,readonly
dialog add,text,textUpdatecontrolsample,@diff(@dlgpos(,h),40),20,100,20
dialog set,controlsamplewindow,@winexists(#controlsample)
dialog hide,controlsamplewindow
dialog set,controlsamplemainwindow,%4
dialog hide,controlsamplemainwindow
rem dialog hide,window
LOADLIB user32.dll
if @ok()
%%controlsampledummy%3 = @lib(user32.dll,SetParent,NIL,@strdel(@winexists(@dlgtext()),1,1),@strdel(@winexists(@dlgtext(controlsamplemainwindow)),1,1))
end
FREELIB user32.dll
dialog show
exit
:controlsamplegetwindow
exit @dlgtext(controlsamplewindow)
:buttonGetDircontrolsamplebutton
%%controlsampledirdlg = @dirdlg()
if %%controlsampledirdlg
dialog set,editShowDircontrolsample,%%controlsampledirdlg
else
dialog clear,editShowDircontrolsample
end
goto evloop
:controlsamplegetvalue
%%x = @dlgtext(editShowDircontrolsample)
exit %%x
:controlsampleupdate
dialog select,%2
if @equal(@winactive(c),controlsample)
%P = @sendmsg(@winexists(@dlgtext(controlsamplemainwindow)),$0086,1,1)
end
rem dialog set,textUpdatecontrolsample,@succ(@dlgtext(textUpdatecontrolsample))
dialog setpos,buttonGetDircontrolsample,20,20,@diff(@dlgpos(,w),60)
dialog setpos,editShowDircontrolsample,40,20,@diff(@dlgpos(,w),60),@diff(@dlgpos(,h),70)
dialog setpos,textUpdatecontrolsample,@diff(@dlgpos(,h),20),20,100,20
dialog set,textUpdatecontrolsample,@succ(@dlgtext(textUpdatecontrolsample))
exit
|
|
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Sat Apr 23, 2011 1:21 am Post subject: |
|
|
From what I remember, you cannot have #includes in a DSU, just in an EXE _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
Aslan Valued Contributor
Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Sat Apr 23, 2011 3:27 am Post subject: |
|
|
He doesn't have any includes in the DSU's script. I think he means that when the above script is is made into a DSU then used in another script that the other script fails to compile.
Did it get it right cnodnarb?
Can you post an example script that uses this DSU and see if we get the same issue.
BTW - is this a VDS 5 or 6 compiled DSU?
BTW2 - My extTable.dsu has 5 #includes in it. |
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Sat Apr 23, 2011 4:27 am Post subject: |
|
|
Here is the script that goes with the above dsu...
When the dsu is referenced as a dsc everything works great. When it's compiled to a dsu everything falls apart. I don't know what the deal is. I compile other similar dsu's fine, and they work fine.
Code: | #include controlsample.dsu
DIALOG CREATE,parent,-1,0,800,333,,CLASS parent,,RESIZABLE
REM *** Modified by Dialog Designer on 4/19/2011 - 22:19 ***
DIALOG ADD,BUTTON,BUTTON1,18,351,144,38,Get Control 1 Value
DIALOG ADD,BUTTON,BUTTON2,97,358,147,39,Get Control 2 Value
dialog add,button,button3,150,351,144,38,Not Accessing control
dialog add,status,status1
dialog show
controlsample add,controlsample,controlsample1,#parent,20,550,250,200
controlsample add,controlsample,controlsample2,#parent,120,20,200,90
%%dialog = 0
dialog select,0
:timer
%%winactive = @winactive()
if @not(@null(%%winactive))
dialog select,0
dialog set,status1,%%winactive
end
:evloop
if @not(@equal(%%dialog,0))
%%dialog = 0
%%x = @controlsample(value)
if %%x
goto infonow
end
end
rem these calls (potentially) change the selected dialog to 1 or 2
controlsample update,1
controlsample update,2
wait event,.1
parse "%%event;%%dialog",@event(d)
dialog select,%%dialog
goto %%event
:button3button
info Control not interfaced with this button - just an info dialog!
goto evloop
:infonow
info %%x
goto evloop
:resize
dialog select,0
%%width = @dlgpos(,w)
%%height = @dlgpos(,h)
dialog select,1
window position,@controlsample(window),20,550,@diff(%%width,550),@diff(%%height,200)
goto evloop
:close
if @equal(%%dialog,0)
exit
else
goto evloop
end
:button1button
dialog select,1
if @controlsample(value)
info @controlsample(value)
end
goto evloop
:button2button
dialog select,2
if @controlsample(value)
info @controlsample(value)
end
goto evloop
|
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|