|
-
Apr 21st, 2015, 08:18 AM
#11
Re: Program Testers
 Originally Posted by reexre
About vbWidgets:
1) where should I put the vbWidgets.DLL ? (I put it in App.Path)
I have AppPath\vbRC5BaseDlls containing the RichClient DLLs
Always put it beside vbRichClient5.dll for regfree deployment, so this is correct.
 Originally Posted by reexre
2) is it correct (to make it RegFree) my change on vbWidgets SubMain ?:
No, what's already there inside Sub Main was correct - and ensures that
the vbWidgets.dll can use *other classes from the RC5 regfree internally*.
In your case, you want to create instances of Classes regfree, which vbWidgets.dll
*exports* on its outside interface (all of the cwWidget-Thingys).
And so, this case has to be handled within your App, not in vbWidgets.dll.
I've seen, that you re-create a New_c (along with a Cairo) regfree in each and
every Class in your StdExe-Project. That is *not* necessary.
When New_c and Cairo are defined Public in a *.bas Module, then they are
automatically "visible" and usable in each and every code-snippet in your
entire Project, so they have to be created Regfree only *once* (in Sub Main()).
Now, to create Widget-Classes regfree from within your Std-Exe-Project,
I usually write a small function for that ....(Public, and placed in the same
Code-Module (besides Sub Main()):
Code:
Public Function NewWidget(ClassName As String) As Object
If App.Logmode Then 'we run compiled
Set NewWidget = New_c.RegFree.GetInstanceEx(App.Path & "\vbRC5BaseDlls\vbWidgets.dll", ClassName)
Else 'we run in the IDE, so we create the instance from the registered version
Set NewWidget = CreateObject("vbWidgets." & ClassName)
End If
End FUnction
 Originally Posted by reexre
3) Where can I find Other Branches of vbWidgets ?
The one on GitHub is the one to use, if you have useful enhancements which
you think should be placed in the Master-Branch there, post them to me,
or make a Git-Pull-Request.
 Originally Posted by reexre
4
Not so easy, I succeded on changing a little bit the cwFileList
so that when a Key is pressed, it set its position to the first item that start with pressedKey-character.
(quite like VB-Control)
That would be a change you could mail me, so that I can update the GitHub-Repo.
 Originally Posted by reexre
5) How to set the Zorder of widgets ?
ah, ok, they seem to follow the "Form.Widgets.Add(" creation order.
At the moment I do not need to change it at Runtime.
IIRC there should be already a "MoveToFront"-Method in cWidgetBase.
 Originally Posted by reexre
6) PropertyGrid-Widget
Seems so easy, but not to me...
Even just only Implementing the PropertyGrid-Widget is an hard challenge for me.
Does standard cwGrid implement "right Column shows the Value (depending on the Value-Type, switching between TextBox, Combo or CheckBox)." ??? [I need HscrollBar too]
In the PropertyGrid-Widget should appear only the properties of Selected Node
-When a Node is Clicked Public-PARAMS-UDT-variable values should be "transfered" to the Grid (and diplay only them)
-When user tweaks properties on GRID they should be transfered to the Public-PARAMS....
I'm thinking about an easyer way...
First thing to make it easy should be, to transfer all your Imaging-Algos into a Dll-Project -
wrapping each of the Algos in its own Class (with all its Parameters as Public Properties).
Example for an RGB-Color-Inversion-Algo:
Code:
Option Explicit
'the Properties are free definable, and can be enumerated completely with the RC5.cProperties-Enumerator later on
Public OnRedChannel As Boolean
Public OnGreenChannel As Boolean
Public OnBlueChannel As Boolean
Private Sub Class_Initialize() 'set Default-Values
OnRedChannel = True
OnGreenChannel = True
OnBlueChannel = True
End Sub
'Now, two generic (unchanging) Public Methods, each Class has to implement in the same signature
'one for Pixels, to process in a Surface-Container
Public Sub PerformOnSurface(Src As cCairoSurface, Dst As cCairoSurface)
If OnRedChannel Then 'perform your Inversion Loop on the Red-Bytes of Src
End If
If OnGreenChannel Then ... a.s.o.
End Sub
'and one for your Double-Precision-Arrays
Public Sub PerformOnDoubleArrays(SrcR() As Double, SrcG() As Double, SrcB() As Double)
If OnRedChannel Then 'perform your Loop on SrcR
End If
If OnGreenChannel Then ... a.s.o.
End Sub
'Maybe two additional Properties should be defined in such a default-interface on each of those Classes
Public Property Get SupportsSurfaces() As Boolean
End Property
Public Property Get SupportsDoubleArrays() As Boolean
End Property
With such a generic usable Dll-Class-definition (which later on would even allow People
to contribute "Plugins"), you should be able to cover most of what you currently have.
I mean, why not "doing it right from the get-go", since you're currently in a re-design-
phase anyways...
Remember, that you can easily load such an "Algo-Class-Definition" from your Dll
regfree later on (quite similar to what you do with vbWidgets.dll-Classes) - and you could
run them in the IDE (whilst developing your surrounding GUI-Project) *native-compiled*
in full-speed (from the compiled Dll).
I know that such "architectural-considerations" are sometimes "hurtful for the creative mind"
(which doesn't want to get bothered with such "unimportant details") - but once you have it
in place, you will thank yourself later on, when the project evolves.
Olaf
Last edited by Schmidt; Apr 21st, 2015 at 12:27 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|