If you use Real Studio and are a blogger, the fine folks over at Figa Labs have (re?) released a plugin for WordPress that formats your REALbasic code properly in WordPress. This is a very nice plugin and is apparently based the PHP code of an old Real Studio employee. So now your code snippets go from this:
Function Ask(instructions as string, byref initialtext as String, bPassword as boolean = false, w as Window) As Boolean
stInstructions.text = instructions
efText.Password = bPassword
efText.text = initialtext
efText.SelectAll
if w = nil then
self.ShowModal
else
self.ShowModalWithin w
end
if bSave then initialtext = efText.text
return bSave
End Function
To this:
Function Ask(instructions as string, byref initialtext as String, bPassword as boolean = false, w as Window) As Boolean
stInstructions.text = instructions
efText.Password = bPassword
efText.text = initialtext
efText.SelectAll
if w = nil then
self.ShowModal
else
self.ShowModalWithin w
end
if bSave then initialtext = efText.text
return bSave
End Function
The only tricky part it remembering the shortcodes, which isn’t really all that hard. “[“rbcode”]” starts the formatting and “[“/rbcode”]” ends it (remove the quotes to actually get it to work). Ideally I’d love to have a button that lets me do format the code without having to remember the shortcodes but hey, life isn’t perfect.
Happy coding, and blogging!