Page 2 of 3

Re: Just starting out... more than usual dumb questions

Posted: Sun Dec 02, 2012 6:48 pm
by skywalk
Methinks it a bit early to dismiss Windows as a future platform :?
I do agree though, anti-virus measures have stolen Windows peak performance for 2 decades.
The virus measures and anti-virus counter measures leave Windows users hobbled to say the least.
What is promising though is white-listing both on Disk and RAM.
The number of viruses continue to grow exponentially and keeping track of their heuristic signatures is more "after the fact".
The problem is significantly more manageable if you instead limit what your computer trusts to run.
Either what is stored to Disk or is loaded into RAM.
Microsoft and others are starting this approach and I hope to see far less clock cycles lost to real-time scanners. :wink:

Re: Just starting out... more than usual dumb questions

Posted: Mon Dec 03, 2012 1:00 pm
by Robynsveil
You might have a point, SkyWalk.

In any event, I really think I'm putting the cart before the horse: in wanting to convert a VBA thing into a stand-alone Linux-based app, perhaps a more deliberate, small-steps-first approach might make sense.

So, I'm thinking perhaps I should first port this to actual Visual Basic 6 (get it working as a stand-alone, full-stop). So it is actually stand-alone with SQLite data backend. And then, look at what I have and understanding that bit, move it to PureBasic for Windows. Then, after I get my noodle around that, port the thing to PureBasic for Linux.

Please be honest: do you see this as a sound approach or am I going about this all wrong? Please be assured that I will humbly consider all your replies and accept any suggestions gratefully.

Re: Just starting out... more than usual dumb questions

Posted: Mon Dec 03, 2012 5:05 pm
by skywalk
As others have said, VBA = VB6, so absolutely do not waste time converting to VB6.
Instead, with pen and paper, or in a notepad document, write down your data structures and procedures you need to convert to PB.
Some new ones will need to be added for sure, since you may have been using ADO or Jet/Access.
But, using SQLite in PB is very fluid.
Then use the new Form Editor(polo) to story board your gui.
In this process you will gain a better understanding of your problem and be well on your way to a solution that will have lasting power vs VB6.

Re: Just starting out... more than usual dumb questions

Posted: Mon Dec 03, 2012 9:20 pm
by Robynsveil
skywalk wrote:As others have said, VBA = VB6, so absolutely do not waste time converting to VB6.
Instead, with pen and paper, or in a notepad document, write down your data structures and procedures you need to convert to PB.
Some new ones will need to be added for sure, since you may have been using ADO or Jet/Access.
But, using SQLite in PB is very fluid.
Then use the new Form Editor(polo) to story board your gui.
In this process you will gain a better understanding of your problem and be well on your way to a solution that will have lasting power vs VB6.
Thank you, SkyWalk. This is excellent advice and will save me heaps of time in the long run. I will do as you suggest. I am currently reading the manual and am quite keen now to get going.

Re: Just starting out... more than usual dumb questions

Posted: Tue Dec 04, 2012 12:59 am
by Robynsveil
Just going through the manual... *Sheesh*, the PureBasic IDE makes VBE look like the difference between Microsoft Office and Works (where Works is the Excel VBE). This is one incredibly sophisticated program! Kudos to the developers: this is amazing. Really looking forward to getting my head around this: the imagination reels considering what can be done. :)

Re: Just starting out... more than usual dumb questions

Posted: Tue Dec 04, 2012 2:40 am
by Robynsveil
Just a quick question. I'm writing these example programs from the PureBasic Book (admittedly for PB 4)... when I F5 this code:

Code: Select all

Enumeration
  #WIN_MAIN
  #TEXT_INPUT
  #STRING_INPUT
  #BUTTON_INTERACT
  #BUTTON_CLOSE
EndEnumeration

Global Quit.b = #False
#FLAGS = #PB_Window_SystemMenu | #PB_Window_ScreenCentered

If OpenWindow(#WIN_MAIN, 0, 0, 300, 200, "Inputting Text", #FLAGS)
  TextGadget(#TEXT_INPUT, 10, 10, 280, 20, "Enter text here:")
  StringGadget(#STRING_INPUT, 10, 30, 280, 20, "")
  ButtonGadget(#BUTTON_INTERACT, 10, 170, 100, 20, "Echo Text")
  ButtonGadget(#BUTTON_CLOSE, 190, 170, 100, 20, "Close")
  SetActiveGadget(#STRING_INPUT)
  
  Repeat
    Event.l = WaitWindowEvent()
    Select Event
      Case #PB_Event_Gadget
        Select EventGadget
          Case #BUTTON_INTERACT
            Debug GetGadgetText(#STRING_INPUT)
          Case #BUTTON_CLOSE
            Quit = #True
        EndSelect
    EndSelect
  Until Event = #PB_Event_CloseWindow Or Quit = #True
EndIf

End

; IDE Options = PureBasic 5.00 (Windows - x86)
; CursorPosition = 24
; EnableXP
; Debugger = IDE
...the little form comes up, but when I type in text in the StringGadget and click the EchoText button, it doesn't appear to be echoed anywhere. I've even selected "Debug Output" in the Debugger->Default Windows section of Preferences... nothing shows up in the Bebug Window, either (despite this from the manual: "The debug window will automatically open at the first output is produced by your program. ... which it did ... If you then close it, it will not automatically open on subsequent messages, however they will still be logged. You can copy this output to the clipboard or save it to a file. There is also a button to clear the messages from the window..."), nor does the Close button close the form.
I just know I'm doing something incredibly stupid... please forgive this question, but for the life of me I can figure out what it is. :shock: :cry:

Re: Just starting out... more than usual dumb questions

Posted: Tue Dec 04, 2012 2:44 am
by Robynsveil
Oh, I should mention that I'm running PureBasic 5 32-bit in XP in VirtualBox. It all apears to be running fine... just no output from the "Debug" thingie... or response to the Close button being clicked.

Re: Just starting out... more than usual dumb questions

Posted: Tue Dec 04, 2012 5:37 am
by electrochrisso
You have forgot to put the () at the end of the Select EventGadget, PB thinks it is a variable.
It should be Select EventGadget().

Re: Just starting out... more than usual dumb questions

Posted: Tue Dec 04, 2012 5:47 am
by skywalk
Remember to always use EnableExplicit :wink:
Debugger wrote:[23:44:13] [COMPILER] Line 24: With 'EnableExplicit', variables have to be declared: EventGadget.

Re: Just starting out... more than usual dumb questions

Posted: Tue Dec 04, 2012 5:55 am
by electrochrisso
skywalk wrote:Remember to always use EnableExplicit :wink:
Debugger wrote:[23:44:13] [COMPILER] Line 24: With 'EnableExplicit', variables have to be declared: EventGadget.
Actually I have to get into the habit using it myself too. :)

Re: Just starting out... more than usual dumb questions

Posted: Tue Dec 04, 2012 6:51 am
by nospam
Danilo wrote:PB is not free. Not in price and not in source code, so real linux guys are not interested
You should speak only for your self, Danilo, not for others. I'm a 'real linux guy'. PB does the job I need it to do and that's sufficient reason to pay for it.

Re: Just starting out... more than usual dumb questions

Posted: Tue Dec 04, 2012 8:37 am
by Danilo
nospam wrote:PB does the job I need it to do and that's sufficient reason to pay for it.
That's good. Your are one of the few, in my experience.

I got flamed/bashed very often when I mentioned/recommended proprietary, closed source, commercial software to Linux guys. :lol:
I don't do that anymore. It's a waste of time, most of the time.

Re: Just starting out... more than usual dumb questions

Posted: Tue Dec 04, 2012 9:09 am
by nospam
Danilo wrote:
nospam wrote:PB does the job I need it to do and that's sufficient reason to pay for it.
That's good. Your are one of the few, in my experience.

I got flamed/bashed very often when I mentioned/recommended proprietary, closed source, commercial software to Linux guys. :lol:
I don't do that anymore. It's a waste of time, most of the time.
lol - next time someone complains about proprietary/closed source/commercial software on Linux, ask them if they use proprietary video drivers. If they say no, ask them how they feel about having bought a computer with a proprietary/closed source/commercial BIOS. I liken those people to cheapskates... too cheap to spend a few dollars and want everything free.

Re: Just starting out... more than usual dumb questions

Posted: Tue Dec 04, 2012 12:42 pm
by Robynsveil
I use Linux because of the features, just like with Blender. And I contribute to both causes. Whilst I'm a huge supporter of FOSS, I feel people definitely have the right to make money from their creations, and support proprietary software when I feel it is worth it. Which PureBasic definitely is!!
The misguided militant stance of FOSS proponents/purists undermines the whole thing. FOSS is in just about all software now, but there is nothing arrogant or zealot about those who actually contribute. TO THAT END I hope to be able to contribute to the movement as well, but also make a little extra with this app I've made.

FOSS is about sharing, not sabre-rattling. Well, to me it is, anyway. :shock:

Re: Just starting out... more than usual dumb questions

Posted: Wed Dec 05, 2012 12:04 pm
by Robynsveil
skywalk wrote:Remember to always use EnableExplicit :wink:
Debugger wrote:[23:44:13] [COMPILER] Line 24: With 'EnableExplicit', variables have to be declared: EventGadget.
Thank you, will do so. Need to alert Willoughby... his tutorial fails to mention this, and the syntax is ever-so slightly different.

I've always done so in VBA: the errors you trap are quite significant! Thanks for this!