Just starting out... more than usual dumb questions

Just starting out? Need help? Post your questions and find answers here.
Robynsveil
User
User
Posts: 44
Joined: Fri Nov 30, 2012 2:07 pm

Just starting out... more than usual dumb questions

Post by Robynsveil »

Hi :D

I've decided to buy a copy of PureBasic for the main 3 platforms. I've written this application in VBA (multiple forms, etc) that manages assets for a medically-oriented department: mine is the recovery unit at the hospital that I work in. The forms simplify managing a fairly large spreadsheet (essentially a large flat-file database, really) containing all the information pertaining to equipment in the department.
The reason I decided it was time to leave Excel and move to a relational DB (I'm looking at SQLite mainly because it is very transportable) is because of the limits of a flatfile dealing with changing (updating) status history on a given device. I cut my teeth on programming in general with FoxPro, so DBMSs are nothing new... have worked with MySQL and SQLServer as well, so I find being able to use SQL statements within the programming environment very appealing, something VBA did not support.

Also, I want to be able to support the 3 main OSes, since I work mostly in Linux and want to support Mac as well as Windows.

I'm wondering about this whole project environment, though... going from like VB6 to PB would seem like less of a step because you'd be familiar setting up the whole application and main form and all of that... all this was managed in VBA within EXcel itself. So, I'm wondering if it would make more sense to try to export my VBA to VB6 first, then PB... or am I wasting my time with VB6?

I do realise that porting a VBA application to PB is going to amount to a complete re-write... I'm prepared to do that.
nospam
Enthusiast
Enthusiast
Posts: 130
Joined: Mon Nov 12, 2012 9:15 am

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

Post by nospam »

Robynsveil wrote:So, I'm wondering if it would make more sense to try to export my VBA to VB6 first, then PB... or am I wasting my time with VB6?
If it were my problem I'd go straight to PB and skip VB. There is so very little difference between VB & VBA that you'll merely spend time to learn how to draw screens in VB because most of the rest of it you already know.

Of course it's your decision, and I'm just giving an opinion.
have worked with MySQL and SQLServer as well, so I find being able to use SQL statements within the programming environment very appealing, something VBA did not support.
Don't, whatever you do, read what's at this link: http://msdn.microsoft.com/en-us/library/bb763068.aspx ... You have been warned :mrgreen:
Robynsveil
User
User
Posts: 44
Joined: Fri Nov 30, 2012 2:07 pm

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

Post by Robynsveil »

Right.

This will amount to a bit of a "hey this happened, what do you reckon..." sort of thread, perhaps.

This whole environment is a bit more detailed and controlled than what I'd worked in before, so some questions have arisen. I'm following this really awesome tutorial for Getting Started called Purebasic, A Beginner's Guide to Computer Programming by Gary Willoughby. Excellent stuff for someone learning a new IDE when before, it was all sort-of proscribed for her.

I've got my just-purchased PureBasic 5.0 (x64) IDE open in Linux. :D How cool is this! The instructions were:

Code: Select all

OpenConsole()
Print("Press enter to exit")
Input()
End
...which I typed into the IDE. When I pressed the Compile/Run icon, it flashed an input box for a tiny second... which quickly disappeared, to be replaced by a dialogue that asked whether I want to use a Standalone debugger even if the IDE is already debugging this. Wonder why I'm not seeing the Input dialogue?
Robynsveil
User
User
Posts: 44
Joined: Fri Nov 30, 2012 2:07 pm

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

Post by Robynsveil »

This is becoming increasing frustrating. Nothing is happening... as in, no dialogues/inputboxes appear. I've moved further down the tutorial in hopes of getting some sort of response with this code:

Code: Select all

If OpenConsole()
    PrintN("1. Official PureBasic Home")
    PrintN("2. Official PureBasic Forums")
    PrintN("3. PureArea.net")
    PrintN("")
    PrintN("Enter a number from 1 To 3 and press Return: ")
    Destination.s = Input()
    Select Destination
        Case "1"
        RunProgram("http://www.purebasic.com")
        Case "2"
        RunProgram("http://forums.purebasic.com")
        Case "3"
        RunProgram("http://www.purearea.net")
        EndSelect
    EndIf
End
but nothing at all is happening. Clues, anyone? :cry:
Robynsveil
User
User
Posts: 44
Joined: Fri Nov 30, 2012 2:07 pm

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

Post by Robynsveil »

Oh sheesh... just had a thought, I ran Purebasic from the CLI (Terminal) with:

me@myHome$ ./purebasic/compilers/purebasic


and come to find out everything is being output *there*!!!! :oops: :oops: Need to figure out how to get this to run without launching from the terminal... this simply won't do. :evil:
Robynsveil
User
User
Posts: 44
Joined: Fri Nov 30, 2012 2:07 pm

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

Post by Robynsveil »

It *does* appear that PureBasic is a very Windows-centric programme. All the help is for Windows. It talks about .dlls, which Linux doesn't use.
:(
Hmm.
Hope that people realise that Windows is definitely not the end-all/be-all. The MAIN reason I went with PureBasic was that is does support Linux, but the support appears to be limited to compiling, not help. Which is why the tutorial examples are failing: they don't account (nor does PB) for the Linux environment.

Hope a Linux user happens by... just looking at this page is demoralising. Feels a bit like when you try to do a date field in Excel and everything defaults to this totally nationalistically myopic month/day/year format. The kludges one has to develop to overcome that are horrendous!!!!
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

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

Post by Danilo »

Robynsveil wrote:Oh sheesh... just had a thought, I ran Purebasic from the CLI (Terminal) with:

me@myHome$ ./purebasic/compilers/purebasic


and come to find out everything is being output *there*!!!! :oops: :oops: Need to figure out how to get this to run without launching from the terminal... this simply won't do. :evil:
You are compiling/writing a console application, so the output is on the console/terminal.

Try the following code from the PB IDE:

Code: Select all

OpenWindow(0,0,0,800,600,"PureBasic Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)

ListViewGadget(0,10,10,780,580)

For i = 1 To 100
    AddGadgetItem(0,-1,"Line "+Str(i))
Next

Repeat
    Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
And do not set compiler options to console compilation.

You probably want a grid gadget to display your database stuff:
- GridGadget
- CS-Grid-Gadget

Moving from Windows+VBA to Linux+PB surely requires some patience. :wink:

I also think PB users represent the real world, so most guys use PB/Windows, some PB/MacOS, and very few PB/Linux.
Especially linux guys hate commercial, capitalistic software, so it is just logical not many linux users use commercial PB -
PB is not free. Not in price and not in source code, so real linux guys are not interested, it is just some Windows converts that buy PB/Linux.
For commercial software companies, Linux is not an attractive market and gets mostly ignored.
That's the reason there is not much high quality, commercial software available for linux.
Robynsveil
User
User
Posts: 44
Joined: Fri Nov 30, 2012 2:07 pm

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

Post by Robynsveil »

Well, I expect no one will comment on these questions: they are all very "too-hard basket" ... but I'm find UI issues in the Linux version which I am suspecting others may be encountering but are either too polite to address or find too difficult to deal with so move back to Windows.

Which I find unacceptable, since for me Windows is very much a second-rate development platform - fraught with massive security issues - so I avoid it like I do someone sneezing and coughing during the cold/flu season. I so want to port my app to both Mac and Linux, both of which are significantly more secure and cleaner environments. However, there doesn't appear to be much support of any real substance for those environments in this development system.

Is Linux just an afterthought for PureBasic? or do people realise that this is a very important step they can take in terms of ensuring their product will sustain the challenges facing OSes in the near future?
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

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

Post by Danilo »

Robynsveil wrote:Is Linux just an afterthought for PureBasic? or do people realise that this is a very important step they can take in terms of ensuring their product will sustain the challenges facing OSes in the near future?
Linux does not play a role for most commercial software developers, and many guys here run a business with the goal
of making money every month to pay the tax. Linux is not an option for most of us. Linux will take over if communism
takes over the world, but I doubt that's anytime soon. We already had big socialistic/communistic experiments in this
world, and they all failed poorly. It is just an theoretical idea. I was born in "German Democratic Republic (GDR)" and have experienced
myself how the system failed. Capitalistic, commercial system is best we have now, so I suggest to just adapt to it and
make the most out of it.
It may sound very selfish to you (oh my god, make money for a living!), but that is how our world really works.
Work hard and make some money to get a house, some ground and food, or die, while living on the street.
This will be even more important in the near future, in my opinion. The big fighters are Microsoft and Apple on desktop, adding
Android for the mobile market. Linux for the desktop market is just not attractive enough, especially for commercial companies
that develop good products for the mass market. There are not much paying customers there, so just forget it for commercial development
and concentrate on Windows and MacOS if you want/need to make some money for a living.
It is more likely the doctors in hospitals get an iPad or Win8 tablet for checking patient data immediately, instead wearing
an touch-enabled linux dektop tablet. There is no single company that would want to manage such a reliable linux based tablet computer.
User avatar
Shardik
Addict
Addict
Posts: 2058
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

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

Post by Shardik »

Robynsveil wrote:

Code: Select all

OpenConsole()
Print("Press enter to exit")
Input()
End
...which I typed into the IDE. When I pressed the Compile/Run icon, it flashed an input box for a tiny second... which quickly disappeared, to be replaced by a dialogue that asked whether I want to use a Standalone debugger even if the IDE is already debugging this. Wonder why I'm not seeing the Input dialogue?
For executing console programs in Linux you have at first to change the executable format to "Console":
In the IDE's menu line click onto "Compiler", "Compiler-Options...", open the dropdown list behind "Executable Format:" and change from "Linux" to "Console"... :wink:
Image
(Kubuntu 12.04 x64)
Robynsveil
User
User
Posts: 44
Joined: Fri Nov 30, 2012 2:07 pm

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

Post by Robynsveil »

Thank you to all who have replied. I much appreciate your input and definitely your perspective on things. I tend to agree that there is a slant away from Linux, but I really think that will change. I can see by the fact that PureBasic does include Linux as an optional OS to compile to the developers understand a bit where operating systems are going.

Your input has been incredibly helpful, all of you! I apologise for my fractious tone: I've dealt too often with software where the Linux version is a token acknowledgement nod. I will endeavour to give positive reinforcement when I can to the devs... and offer suggestions, otherwise, perhaps?

Is that cool?? :D
Robynsveil
User
User
Posts: 44
Joined: Fri Nov 30, 2012 2:07 pm

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

Post by Robynsveil »

Danilo wrote:
Robynsveil wrote:Oh sheesh... just had a thought, I ran Purebasic from the CLI (Terminal) with:

me@myHome$ ./purebasic/compilers/purebasic


and come to find out everything is being output *there*!!!! :oops: :oops: Need to figure out how to get this to run without launching from the terminal... this simply won't do. :evil:
You are compiling/writing a console application, so the output is on the console/terminal.

Try the following code from the PB IDE:

Code: Select all

OpenWindow(0,0,0,800,600,"PureBasic Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)

ListViewGadget(0,10,10,780,580)

For i = 1 To 100
    AddGadgetItem(0,-1,"Line "+Str(i))
Next

Repeat
    Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
And do not set compiler options to console compilation.

You probably want a grid gadget to display your database stuff:
- GridGadget
- CS-Grid-Gadget

Moving from Windows+VBA to Linux+PB surely requires some patience. :wink:

I also think PB users represent the real world, so most guys use PB/Windows, some PB/MacOS, and very few PB/Linux.
Especially linux guys hate commercial, capitalistic software, so it is just logical not many linux users use commercial PB -
PB is not free. Not in price and not in source code, so real linux guys are not interested, it is just some Windows converts that buy PB/Linux.
For commercial software companies, Linux is not an attractive market and gets mostly ignored.
That's the reason there is not much high quality, commercial software available for linux.
Thank you - this has been singularly helpful! I will follow this to the letter.

Regarding Linux: I think that you might be surprised where things will go in the next few years, and it won't be because of communism or any such political upheaval. The US military have already decided Linux is a better choice because of security for mission-critical devices. I'm a small-time programmer in the medical arena: I see the failings of programs written for Windows in our sector daily. Touch-screen? sure, we've already got that. But we have to re-boot every morning because of the OS. Windows is crap... that's the bottom line. Might as well spend my energy (what's left of it) writing for an environment that will endure... it'll be some 'nix-based something, Apple or something.

I have several computers that I maintain. The headaches? Windows PCs. Linux? no dramas. :) So, yeah I know all about market share and all that but at the end of the day, the fact that Google and Pixar and the US Military and the French Government all gave Windows the boot says a lot. :lol:
User avatar
spikey
Enthusiast
Enthusiast
Posts: 750
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

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

Post by spikey »

Robynsveil wrote:So, yeah I know all about market share and all that but at the end of the day, the fact that Google and Pixar and the US Military and the French Government all gave Windows the boot says a lot. :lol:
Google - want to promote their own operating systems. It would be a joke in the media if they said "you must license our OS but we use someone else's".

Pixar - I don't know but I suspect it has something to do with large scale cloud based animation processing applications - and if your gonna have to support an os there - why not standardize?

US and French governments are both in dire straits for money and Linux is "free" meaning they can get away from large license fees to a proprietary software provider. Doesn't take into account that the IT industry at large suggest ongoing delivery and support costs are higher for Linux than Windows - but maybe the savings they stand to make are high enough to offset this.

Nonetheless Linux is a good thing - as it hopefully will serve to prevent any future monopoly.
Jacobite
User
User
Posts: 16
Joined: Fri Nov 30, 2012 7:21 pm

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

Post by Jacobite »

My 2 cents:

I use Linux but not for idealogical reasons, I just got fed up with the poor performance and reliability of Windows. Not sure if the newer versions are any better because I've been using Linux for a few years now, but I used to have to reinstall Windows every year because the system would degrade over time and eventually it would become almost unusable.

I'm hoping to make some money from writing PB programs but I'm aware of the reality that it's a Windows-centric world, so I have XP running in VirtualBox. PB works fine on Linux for my purposes though, and most of what's in the help file is applicable to all 3 platforms.
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

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

Post by Tenaja »

Jacobite wrote:...I just got fed up with the poor performance and reliability of Windows. Not sure if the newer versions are any better....
I've been using W7 all year. I put my laptop to sleep every night, and reboot it when updates require it. Maybe once or twice a month extra, but I have easily gone several weeks without a reboot. It's a far cry from the twice-daily reboots of yore.

Although I am quite happy with W7, I'd likely use Linux if "real" software were available, but it is not. And it will likely not become available for a very long time.
Post Reply