DialogDesign0R V1.84

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
Mesa
Enthusiast
Enthusiast
Posts: 345
Joined: Fri Feb 24, 2012 10:19 am

Re: DialogDesign0R V1.70

Post by Mesa »

Today everything is ok, so, i don't understand...

I did a french translation of hereDD_SaveTemplateEditor.pb downloadable here
http://frazier.wood.free.fr/pb/DD_SaveT ... itor_fr.pb

And in this file, the program crash if you do File/Quit but not if we use the cross on the top right of the window. (32 and 64bits)

M.
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.70

Post by HeX0R »

O.k., this is a real one, change the PostEvent() in OnMenu_Quit() to:

Code: Select all

PostEvent(#PB_Event_CloseWindow, DialogWindow(#Dialog_Main), 0)
Sources updated, I also added the french Code from Mesa, didn't thought translations are needed for that tiny thing, though :wink:
Mesa
Enthusiast
Enthusiast
Posts: 345
Joined: Fri Feb 24, 2012 10:19 am

Re: DialogDesign0R V1.70

Post by Mesa »

Could you add a new function or a new addon, which automatically creates a final directly usable purebasic file (or several *.pb files) ?
It would be great to have the xml file and a xxx.pb file.

Thanks.

M.
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.70

Post by HeX0R »

?? What do you think those templates are for??
That functionality was included since the beginning already, I just "pimped" it a little bit.

In the preferences you set the default settings for new created dialogs (Miscellaneous / Save Names/Ids to additional File + include Dialog)
And if you select the "dialogs" tag of an existing Dialog in the tree, you can enable that functionality on the right side also.

It might be time for a help file... damn...
Mesa
Enthusiast
Enthusiast
Posts: 345
Joined: Fri Feb 24, 2012 10:19 am

Re: DialogDesign0R V1.70

Post by Mesa »

oops, didn't see it.

Menus, toolbars and statusbars are not displayed. (no crash) Maybe it's the next step ?

I tried to play with the DEX module (viewtopic.php?f=12&t=76247) but i didn't have any results.

M.
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.70

Post by HeX0R »

Yes, that extra stuff is not (yet?) included in the templates.
You simply include the DEX module and replace

Code: Select all

 OpenXMLDialog(a, b, c)
with

Code: Select all

 DEX::InitDialog(a, b, c, #True)
That should show the extra things like menus then
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.71

Post by HeX0R »

V1.71 has been released.
Mesa
Enthusiast
Enthusiast
Posts: 345
Joined: Fri Feb 24, 2012 10:19 am

Re: DialogDesign0R V1.71

Post by Mesa »

The new french lan file is here: http://frazier.wood.free.fr/misc/Francais.rar
:wink:

M.
Mesa
Enthusiast
Enthusiast
Posts: 345
Joined: Fri Feb 24, 2012 10:19 am

Re: DialogDesign0R V1.72

Post by Mesa »

Hi, v1.72 doesn't compile.

I did some fixes, like:line 110:Global NewList RecentDialogs._RECENT_DIALOGS_() and add this line: Global NewMap FileIcons.s()


but it's not enougn, it doesn't compile anymore, maybe the source code is not the ultimate version ?

Mesa.
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.72

Post by HeX0R »

Yeah, as usual one source in the zip had been forgotten.
Please download it again.
User avatar
tj1010
Enthusiast
Enthusiast
Posts: 621
Joined: Mon Feb 25, 2013 5:51 pm
Location: US or Estonia
Contact:

Re: DialogDesign0R V1.72

Post by tj1010 »

Hiding MultiBox for layout switching doesn't work. Invisible checkbox actually doesn't work on anything

Putting >69 in RowSpan for VBox crashes
Faulting application name: dd_x64.exe, version: 0.0.0.0, time stamp: 0x61069530
Faulting module name: dd_x64.exe, version: 0.0.0.0, time stamp: 0x61069530
Exception code: 0xc0000005
Fault offset: 0x00000000000876c7
Windows 10 X64

Otherwise flawless work
The truth hurts.
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.72

Post by HeX0R »

You don't hide the Multibox, but the container(s) below.
And invisible checkboxes work just fine here (see example below), do you have an example?

That RowSpan thing seems to be an error (limitation?) in the dialog library, OpenXMLDialog() crashes, see here:

Code: Select all

;/-------------------------
;|
;| Names, IDs, Procedures
;|
;| Example Template for Dialog Design0R
;|
;/-------------------------

#DD_WindowCount = 1

;Set to 1 to let OpenXMLDialog() crash
#LET_IT_CRASH = 0

Dim DD_WindowNames.s(#DD_WindowCount)

DD_WindowNames(1) = "window_1"



#DD_GADGET_text_1     = "text_1"
#DD_GADGET_checkbox_1 = "checkbox_1"
#DD_GADGET_text_2     = "text_2"
#DD_GADGET_editor_1   = "editor_1"
#DD_GADGET_checkbox_2 = "checkbox_2"
#DD_GADGET_string_1   = "string_1"




Procedure.s GetXMLString()
	Protected XML$

	XML$ + "<?xml version='1.0' encoding='UTF-16'?>"
	XML$ + ""
	XML$ + "<dialogs>"
	XML$ + "  <window flags='#PB_Window_SystemMenu | #PB_Window_SizeGadget' minwidth='300' minheight='250' name='window_1' xpos='1201' ypos='319'>"
	XML$ + "    <gridbox columns='2'>"
	XML$ + "      <text text='bla' name='text_1'/>"
	XML$ + "      <checkbox name='checkbox_1' invisible='yes'/>"
	CompilerIf #LET_IT_CRASH
		XML$ + "      <vbox colspan='2' rowspan='69'>"
	CompilerElse
		XML$ + "      <vbox colspan='2'>"
	CompilerEndIf
	XML$ + "        <text text='bla bla bla' name='text_2'/>"
	XML$ + "        <editor name='editor_1'/>"
	XML$ + "      </vbox>"
	XML$ + "      <checkbox text='Hello You' name='checkbox_2'/>"
	XML$ + "      <string name='string_1'/> "
	XML$ + "    </gridbox> "
	XML$ + "  </window>"
	XML$ + "</dialogs><!--DDesign0R Definition: PureBasic|1|1|1|_|example_with_declares|0-->"

	ProcedureReturn XML$
EndProcedure
;Test it
CompilerIf #PB_Compiler_IsMainFile
	
	a$ = GetXMLString()
	If ParseXML(0, a$) And XMLStatus(0) = #PB_XML_Success
		For i = 1 To #DD_WindowCount
			CreateDialog(i)
			R = OpenXMLDialog(i, 0, DD_WindowNames(i))
			If R
				HideWindow(DialogWindow(i), 0)
				ok = #True
			Else
				Debug DialogError(i)
			EndIf
		Next i
		CompilerIf Defined(PB_OS_Web, #PB_Constant) = 0 Or #PB_Compiler_OS <> #PB_OS_Web
			If ok
				While WaitWindowEvent() <> #PB_Event_CloseWindow : Wend
			EndIf
		CompilerEndIf
	Else
		Debug XMLStatus(0)
		Debug XMLError(0)
	EndIf

CompilerEndIf

;(c) HeX0R 2021
User avatar
tj1010
Enthusiast
Enthusiast
Posts: 621
Joined: Mon Feb 25, 2013 5:51 pm
Location: US or Estonia
Contact:

Re: DialogDesign0R V1.72

Post by tj1010 »

Just some observations when referencing OpenXMLDialog help
  1. Columns on GridBox also crashes with big numbers
  2. Container is the only thing I've seen that Invisible works on, but Invisible checkbox is enabled on all types of layout holders even though it does nothing. Disabled on all but container seems the right way
  3. MultiBox is suppose to support "All common attributes." but none are in the builder UI
  4. Rows are some discreet number... Columns is the only thing configurable and only through GridBox. Mess with RowSpan on the VBox holding ListIcon in below Dialog and you'll see undocumented behavior Like at 800x600 it grows till 40 RowSpan, but shrinks >40; Where as Columns is nice and straight forward on GridBox save the big number crash bug
<?xml version="1.0" encoding="UTF-8"?>

<dialogs>
<window flags="#PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered" minwidth="800" minheight="600" name="window_1">
<multibox>
<container flags="#PB_Container_BorderLess">
<gridbox colexpand="yes" rowexpand="yes" columns="1">
<vbox spacing="1">
<hbox spacing="1">
<string flags="#PB_String_Numeric" name="string_1Copy_17Copy_18Copy_18Copy_20"/>
<string flags="#PB_String_Numeric" name="string_2Copy_18Copy_19Copy_19Copy_21"/>
<button text="Start" name="button_1Copy_19Copy_20Copy_20Copy_22"/>
</hbox>
</vbox>
<vbox spacing="0" rowspan="40">
<hbox spacing="0">
<listicon name="listicon_1Copy_7Copy_14Copy_15Copy_23Copy_25" text="First"/>
</hbox>
</vbox>
</gridbox>
</container>
<container flags="#PB_Container_BorderLess" invisible="yes" disabled="yes">
<gridbox colexpand="yes" columns="1" rowexpand="yes">
<option name="option_1Copy_16"/>
</gridbox>
</container>
</multibox>
</window>
</dialogs><!--DDesign0R Definition: PureBasic|0|0|0||-->
The truth hurts.
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.72

Post by HeX0R »

2 / 3.)
The container is the only "real" Gadget here, all the other layout holders, like vbox, hbox, gridbox, multibox are only virtual gadgets.
You can't reference them anyway later, because no Gadget command would work.
So which common attributes are you in need of, and how do you expect them to help?

1 / 4.) Seems you found some more bugs in the dialog lib.
Where have you been, when the dialog lib has been introduced? :mrgreen:
User avatar
tj1010
Enthusiast
Enthusiast
Posts: 621
Joined: Mon Feb 25, 2013 5:51 pm
Location: US or Estonia
Contact:

Re: DialogDesign0R V1.72

Post by tj1010 »

HeX0R wrote: Mon Sep 13, 2021 6:56 pm 2 / 3.)
The container is the only "real" Gadget here, all the other layout holders, like vbox, hbox, gridbox, multibox are only virtual gadgets.
You can't reference them anyway later, because no Gadget command would work.
So which common attributes are you in need of, and how do you expect them to help?

1 / 4.) Seems you found some more bugs in the dialog lib.
Where have you been, when the dialog lib has been introduced? :mrgreen:
The MultiBox things I don't need. Putting expand on GridBox(s) under the containers in one seems to work. I also don't see much use for extended config on MultiBox.

In a parent GridBox using "item:" based expand seems to avoid the weird Row generation issue. Otherwise knowing Rows would take brute-force or the generation system being documented.
The truth hurts.
Post Reply