My own projects have #PRAGMA warning “TODO” in the App.Open event. Wherever you want a ToDo note in your code type #PRAGMA warning “Your message”.
Comments closedCategory: Tips
sort code tips and tricks
Sure you can create a Subclass of any Picture, Canvas or class and write code to center another Picture in its respective Graphics contexts. But taking the class extension approach means that you can reuse the same code for any of these (or any additional class) offering a Graphic context, so you can pass along the Picture you want to center and re-scale (if needed) in its area.
Comments closedThe Xojo Web Framework offers the WebLink class ready to use which handles showing the text with the proper visuals and the opening of the underlying URL in the browser. But if you need to have that feature on Desktop, it’s not that hard! Continue reading so I can show you one possible implementations to create your own LinkLabel class on Desktop.
Comments closedOften in our projects we need to apply some kind of validation of the user input so we get the data we are expecting. For example, getting a valid email addresses or URL. I want to share with you a couple of String Class extensions you can use to see (and conform) whether the user typed a valid email or URL, this is not a silver bullet (there are always exceptions), but it can save you some time now and in future projects.
Comments closedAll of us are used to dealing with that web form where we select a country from a long, long list of more than 200 hundred countries. It would certainly be more useful, less stressful and a better usability practice to preselect the country name from the IP of the client visitor. Continue reading to learn how you can put a bit of intelligence into your web forms using a WebPopupMenu subclass.
Comments closedDepending on your style of coding the Enumeration Editor might be used regularly or not a lot. But, either way it probably contains a secret or two waiting for you.
Comments closedAPI 2.0 added Var as an alias for Dim. Var is more recognized by coders from other languages and that’s great. Easily readable code is the goal, so I use both.
Comments closedOften when debugging an application, you’ll need to enter the same data in the same fields over & over. There is a temptation to set the value of the field to the test data. The downside of this is that you need to remove all those defaults before deploying your application.
Comments closed