I'll make this short and quick! This is a topic to see if we can figure out if we can figure out how to make a notifications system in hybrid basic. Any ideas would be appreciated! Thanks!
The basic element of a Notification program is to notify the user of something. Basically, something says "Oh, this happened while you were away so here's a reminder to check me!" Most of the time, this happens in the background when the program isn't running but that's a challenge on a calculator. So, your notifications might tend to be more as a reminder for the future.

For instance, you can have a racing game that keeps a Top 10. If you beat one of the times on the Top 10, you can quietly call the notification program and save a string that reads "You placed 5th in the top ten in Generic Calc Racings' Time Trial!" then you hand control back to the racing program and it can carry on. When the user exits back to the DCS menu the notification program will show a new notification and they'll click it.

This is where it'll get tricky: How do you use the same program to store info in the background and also display info? Simple, variables. The calling program, in this case is Generic Calc Racing, would call your notification program using a pre-defined system. It's super basic.

    10:"Placed 5th in Time Trial!->Str9:prgmNOTIFY

This saves 10 in the variable Ans, stores text into a string and launches your program. Your program will check if Ans is 10. If it is, store Str9 securely in an AppVar or a list then use the command "Return" to hand control back to the calling program. If Ans isn't 10 then draw the GUI and display available notifications where you can mark them as read or let them be so you can remember what you had to do later.

It's a bad idea to store things as a string. You either want to use the libraries to store it as a AppVar (if possible?) or write (or get permission to use) a function that converts a string into a list and back into text. Using a list will allow you to name it and archive it. I had a pretty decent list to text function and I'll try to find the topic on the old TIFW. It even had word wrapping! Not sure if it converted text to a list, though.
This would work yes, but then what about the dynamic icon, how could we do both at the same time? Also what built in libraries have appvar manipulation? Does Celtic III, cause it would be great if the user didnt have to download any extra libraries. Do you have any ideas on how to make a program that would run in the background of DCS and check certain things like battery life and ram and if they get too low let you know while you are in DCS. Also what about this? What if you could create a folder called notific. Then when ever a notification is posted a program with the name of the notification and a custom icon appears and when clicked on does what ever you please? this way the program could do alot more with notifications.
You could easily update the icon at the same time the notifications are saved. You just don't want to do *too* much so the user isn't waiting for a while. Meanwhile, I think the DCS Basic Library allow you to write to an AppVar but I'm not 100% certain but I am sure the libraries included in DCS allow you to.

For "running in the background," you're out of luck. The TIOS only allows one thing to be run at a time with the exception of hooks. But if you follow App development (especially DCS), hooks are limited and reserved for Apps. So, your program will have to function without them. Your best bet is to run system checks whenever the program is ran. When Generic Racing saves a top score message then check the battery, RAM etc. But again, put speed over function. If the user intentionally opens the program then you can be as slow as you want but for a quick addition of a notification it should be as short/interruptive as possible.

For the program per notification idea, rethink it. You can't automatically add a program to a folder, the user has to manually move it. Also, creating a program from a program, will be incredibly hard if not impossible but I'll let someone with more experience confirm or correct me on that.
Do you have any ideas other than app vars cause I can find any command in the DCS libs or the included libs that creates appvars?
Have a look at Celtic's functionality:
http://dcs.cemetech.net/index.php/BasicLibs:ToggleSet
http://dcs.cemetech.net/index.php/BasicLibs:LineWrite
There are probably some other commands. Be prepared to dig through the list.

http://dcs.cemetech.net/index.php/Third-Party_BASIC_Libraries
I've used Celtic I just didnt know it had appvar functionality.Thanks this is a big help!
That's fine. Hope it all works for you.
Thanks man for pointing this out to me! But I ended up just storing them in a program so it can also be edited by other program too!
Notify has finally been released after two days of planning and and afternoon of coding! You can find it here!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
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

 

Advertisement