forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


DESIGN style: why not documented?
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Sep 19, 2003 8:22 pm    Post subject: DESIGN style: why not documented? Reply with quote

Why is DESIGN never documented in help files? It's probably an "internal"
feature for the developers of VDS but I think it's really useful and it is not
too hard to learn about? I don't understand why it isn't ever documented. Confused

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Mon Sep 29, 2003 8:21 am    Post subject: Reply with quote

Tommy made a small dlgedit script which used the DESIGN style.
Perhaps it would help:

Code:

rem *** Visual DialogScript 3.51 specific code ***
  rem Name:    Dialog editor
  rem Version: 1.0
  rem Author:  Tommy Sools   tommy@sools.com   http://www.sools.com
  rem
  rem Description:
  rem A simple dialog editor with snapping grid
  rem
  rem Effects:
  rem The grid is painted very slowly, it would be better to use a bitmap for the grid.
  rem
  rem
  rem Copyright:
  rem - You can use this source code in personal projects,
  rem   compile it in an .EXE file and distribute it freely in binary form.
  rem - You cannot redistribute this source code without permission of the
  rem   original author.
  rem - This software is provided AS IS, without any warranty of any kind.
  rem - The author may have set additional copyrights for this software,
  rem   which in that case are mentioned in the author's description of the
  rem   source code.
  %%GridSize = 8
  %%TextNum = 0
  %%PaintGrid =
  option decimalsep,.
  dialog CREATE,New Dialog,-1,0,240,160,DESIGN
  dialog ADD,STYLE,editor_black,,6,,BLACK,BACKGROUND
  dialog ADD,BUTTON,TEXT1,8,10,,,Text1
  dialog SHOW
  if %%PaintGrid
    %A = -1
    %C = -1
    repeat
      %A = @succ(%A)
      %B = -1
      repeat
        %B = @succ(%B)
        %C = @succ(%C)
        dialog add,text,editor_grid%C,@prod(%A,Cool,@prod(%B,Cool,1,1,,editor_black
      until @equal(%B,@pred(@div(@dlgpos(,W),Cool))
    until @equal(%A,@pred(@div(@dlgpos(,H),Cool))
  end
:evloop
  wait event
  goto @event()
:TEXT1CLICK
  dialog attach,text1
  goto evloop
:TEXT1CHANGE
  %E = T
  gosub gridadjust
  dialog setpos,TEXT1,%D
  %E = L
  gosub gridadjust
  dialog setpos,TEXT1,,%D
  %E = W
  gosub gridadjust
  dialog setpos,TEXT1,,,%D
  %E = H
  gosub gridadjust
  dialog setpos,TEXT1,,,,%D
  dialog detach,TEXT1
  dialog attach,TEXT1
  goto evloop
:GRIDADJUST
  %A = @dlgpos(TEXT1,%E)
  %B = %A
  if @not(@numeric(@fdiv(%B,%%GridSize).0))
    repeat
      %B = @pred(%B)
    until @numeric(@fdiv(%B,%%GridSize).0)
  end
  %C = %A
  if @not(@numeric(@fdiv(%C,%%GridSize).0))
    repeat
      %C = @succ(%C)
    until @numeric(@fdiv(%C,%%GridSize).0)
  end
  if @greater(@diff(%A,%B),@diff(%C,%A))
    %D = %C
  else
    %D = %B
  end
  exit
:CLICK
  goto evloop
:CLOSE
  exit


Or, if vds_code.php won't work Wink, you can download it here

I also wish it would be documented in the helpfile, because I was planning to create a more advanced (and more professional looking) dialog editor. Is the Dialog Designer's source code available for download to the public, or do you need to be a registered vds user?

Vic

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Mon Sep 29, 2003 12:46 pm    Post subject: Reply with quote

I don't think Commercial Research will make the code public. However you can try to ask them if they want to give you the source so you can make a new Dialog Designer for them... Rolling Eyes
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Mon Sep 29, 2003 1:01 pm    Post subject: Reply with quote

I hope they will Rolling Eyes

Vic

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Mon Sep 29, 2003 1:08 pm    Post subject: Reply with quote

Er, it's not the most easily understandable piece of code I've ever seen. I didn't write it, and I don't have a clue what most of it does. If that's what you want to do, you might be better off starting from scratch...
_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Mon Sep 29, 2003 2:25 pm    Post subject: Reply with quote

Dialog designer is missing in certain important areas just for example dealing with multiple dialog elements eg. user wants to swap two buttons or arrange all of them along the left side. Equalize the space between all the similar elemnts or arrange the item as from Y to X axis. Resize all the elements by using a reference element. Undo option.
I incorporated most of the above things (there are many more) in to a Dialog designer assist for myself. I posted it too with detailed help and source code too.
http://forum.vdsworld.com/viewtopic.php?t=1960

I don't know if any one has tried it. I does have limitations as it manipulates things externally and has no access to the data maintained in the VDSlists, but does help me atleast. (you should disable snap to grid for it to work)

DD has seen no major change since it's inception except new elemnts
I thought @LIB() function was added for this but it doesn't seem they used it.
Else many/most of the problems could have been solved and really *cool* features could have bben added.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Mon Sep 29, 2003 2:48 pm    Post subject: Reply with quote

It may be a good idea to have a opensource dialog designer that we all develop together. This may prove to be a better alternative to the VDS supplied one.
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Mon Sep 29, 2003 3:00 pm    Post subject: Reply with quote

A dialog designer is a horrible thing to write. I wrote the one for VDS 2 in Delphi. It was very flaky. I added the DESIGN mode when I was finishing off VDS 3 for SADE, so that the dialog designer could be written in VDS. I wrote a simple one using it, but the current one is quite a lot more sophisticated than that. Personally I find it quite adequate, but for many minor adjustments I prefer to edit the actual code. I get the same spacing between elements by doing a bit of mental arithmetic.
_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Mon Sep 29, 2003 3:13 pm    Post subject: Reply with quote

I think it doesn't have to be real big. Just use a subroutine to place the elements on the dialog, and one to (re)move them. I think it will only take about 100 lines... Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Mon Sep 29, 2003 3:17 pm    Post subject: Reply with quote

A dialog desiger in 100 lines. This I must see... Very Happy
_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Mon Sep 29, 2003 3:18 pm    Post subject: Reply with quote

Edit: Removed.
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Mon Sep 29, 2003 4:07 pm    Post subject: Reply with quote

There also is a 'remove' button when editting your script... Wink

Btw. Julian, it's a bit more, but I was giving a general idea... Smile I'm working on one now, and I only have to implend code to change element positions. After that, I'll show it... Smile

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Mon Sep 29, 2003 4:09 pm    Post subject: Reply with quote

I know. I could have deleted it too.. that would have been too easy. Smile
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Sep 29, 2003 7:31 pm    Post subject: Reply with quote

PGWARE wrote:
It may be a good idea to have a opensource dialog designer that we all develop together. This may prove to be a better alternative to the VDS supplied one.


YES!
I agree totally with you and I said the same thing a long time ago
but nobody listened really.

I run into a lot of bugs that I don't always have time to report and
I think I would add a lot of things into it.

The best thing about opensource code is that it gets developed
really quickly, the bugs are worked out really quickly, and it becomes
a really stable and featureful (it that even a word? Wink ) piece of code.

I really think that would be a good idea. Very Happy

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Mon Sep 29, 2003 7:39 pm    Post subject: Reply with quote

I agree. Let's get to it! Smile
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group