Git Flow and Release Process
Note: Spartacus 3.x is no longer maintained. Please upgrade to the latest version.
Note: Spartacus 3.x was tested with SAP Commerce Cloud versions 1905 to 2105. Spartacus 3.x has not been verified to work with (and is not guaranteed to work with) SAP Commerce Cloud 2211 or later releases.
Table of Contents
Library Version Compatibility
The Spartacus project is made up of a set of libraries. To make it easier to know which version of a library is compatible with another version, the library versions are synchronized across all packages. This means that when we want to release version 1.5.0
, we release all libraries under this version, even if some libraries do not have any changes since the previous release. In so doing, we can use a single version number to refer to the entire set of Spartacus libraries for any given release.
This also means that you can be confident that if you install all packages with the same version, everything will work together correctly. Different versions of libraries may work well together, but we do not test those configurations and cannot promise correct behavior.
Version Support
For versioning, we follow semantic versioning, also known as SemVer. Aside from stable
versions, Spartacus also produces next
and rc
releases.
Our assumptions about versions are as follows:
- A
stable
version is a well-tested Spartacus release (including testing by the community), and will only be patched with bug fixes. These versions are available under thelatest
tag on npm. - An
rc
version is released when the Spartacus team has finished development of all new features for that version, which means there won’t be any major changes in the features nor in the public API. The community can safely start testing the features in anrc
release. Anrc
release might contain a few bugs that will be fixed before thestable
version is released. When there aren’t any more bugs and the community stops reporting issues for that version, we proceed with producing thestable
release. -
A
next
version is released when the Spartacus team finishes a particular feature. This allows the community to start testing the feature right away. Thesenext
versions may contain a lot of bugs, and the features and public API may be still be subject to change. If you want to test new features as soon as possible, this is the version for you. Thenext
versions are available under thenext
tag on npm.Note: It is strongly recommended that you do not use a
next
version in a production setup. This is because upgrading from anext
release may be much more difficult that upgrading from onestable
version to another.
Support Policy
There is always at least one stable
or rc
version supported.
Once version x.y
is released, it will be actively maintained until a new stable
or rc
for version x.z
is released. At that point, version x.z
will become the actively maintained version, and work on the next version wil begin.
For example, let’s say we just released version 1.5.0-rc.0
. From that moment, version 1.5.x
will be actively maintained, until we release 1.6.0-rc.0
. Once version 1.6.0-rc.0
is released, then we would switch active support to version 1.6.x
.
Note: For important security issues or critical bug fixes, there may be additional patches for versions that are no longer actively maintained.
Git Flow
The flow in the Spartacus project is structured around the version support described in the previous sections.
The develop
branch is the default branch, and is intended for new version development, for both minor and major versions. All features and bug fixes are merged to this branch.
There is also a maintenance branch, which changes with new stable
or rc
releases, and this is used for patch versions. Only bug fixes are merged to the maintenance branch.
Once we release version 1.4.0-rc.0
, the release/1.4.x
branch is treated as a maintenance branch. When we release version 1.5.0-rc.0
, then the release/1.5.x
branch becomes the maintenance branch, and so on.
Other branch conventions:
feature/GH-xxxx
branches are used for simple features and bug fixesepic/epic-name
branches are used for big features (called epics)release/1.4.0-rc.0
branches are used for specific releases (you can distinguish them from maintenance branches because the full version number is included)
Flow for Epic Development
The following are the steps for working with epics:
- Create a new
epic/epic-name
branch from thedevelop
branch. - Create branches for epic subtasks from
epic/epic-name
, and merge them back to theepic/epic-name
branch. - From time to time, update your
epic/epic-name
branch with changes from thedevelop
branch (it will help you with managing conflicts). - When the epic is complete, create a PR and merge the
epic/epic-name
branch to thedevelop
branch.
Flow for Smaller Features
The following are the steps for working with smaller features:
- Create a new
feature/GH-xxxx
branch from thedevelop
branch. - Develop your feature.
- When you have finished, create a PR and merge the
feature/GH-xxxx
branch to thedevelop
branch.
Flow for Bug Fixes
The following are the steps for working with bug fixes:
- Create a new
feature/GH-xxxx
branch from thedevelop
branch. - Fix the bug.
- Create a PR and merge the
feature/GH-xxxx
branch to thedevelop
branch. - If this fix applies to the actively-supported version, create a new
feature/GH-xxxx-maintenance
branch from the maintenance branch. - Cherry pick the commit with the fix from the
develop
branch. - Create a PR and merge
feature/GH-xxxx-maintenance
into the maintenance branch.
Release Schedule
Currently, we do not have scheduled releases. The product owner or the team decides when to release a new version.
Terminology
The following are terms we currently use that can be misleading:
- “feature freeze” describes a moment when we have completed all features for a new minor or major release (which means we want to release an
rc
very soon, but still need to fix some bugs). - “code freeze” describes the moment when we stop committing code (although this is not needed with our flow, because we can always cut a release or maintenance branch and keep committing).
The following concepts can be used to replace these terms:
- Instead of having a feature freeze, we can create a new maintenance branch and release a new
rc
. The first RC can be buggy, because it is accepted thatrc
releases may contain bugs. - Instead of having a code freeze, we can create a new release branch. We never need to block the main development or maintenance branch (and we don’t need to bother developers with these details, because our flow supports concurrent work on these branches and releasing another version).


Coderetreats are run by volunteers who want to help out their local developer community. Hosts handle all of the logistics, and facilitators guide participants through the exercises.
Coderetreats are easy to organize and facilitate. Most of all, they are a lot of fun and a great way to meet other developers in your area!
What are you waiting for? Grab a buddy and organize a coderetreat today!
Join hundreds of hosts who want to help developers in their community improve their craft.


Berkeley DB: DbTxnMgr.stat
DbTxnMgr.stat
import com.sleepycat.db.*;
public DbTxnStat stat()
throws DbException;
Description
The stat method creates a DbTxnStat object encapsulating a statistical
structure.
The transaction region statistics are stored in a DbTxnStat object.
The following data fields are available from the DbTxnStat object:
- public int st_refcnt;
- The number of references to the region.
- public int st_regsize;
- The size of the region.
- public DbLsn st_last_ckp;
- The LSN of the last checkpoint.
- public DbLsn st_pending_ckp;
- The LSN of any checkpoint that is currently in progress. If
st_pending_ckp is the same as st_last_ckp there
is no checkpoint in progress.
- public long st_time_ckp;
- The time the last completed checkpoint finished (as returned by
time(2)).
- public int st_last_txnid;
- The last transaction ID allocated.
- public int st_maxtxns;
- The maximum number of active transactions supported by the region.
- public int st_naborts;
- The number of transactions that have aborted.
- public int st_nactive;
- The number of transactions that are currently active.
- public int st_nbegins;
- The number of transactions that have begun.
- public int st_ncommits;
- The number of transactions that have committed.
- public int st_region_wait;
- The number of times that a thread of control was forced to wait before
obtaining the region lock.
- public int st_region_nowait;
- The number of times that a thread of control was able to obtain
the region lock without waiting.
- public Active st_txnarray[];
- The array of active transactions. Each element of the array is an object
of type DbTxnStat.Active, a top level inner class, that has the following
fields:
- public int txnid;
- The Transaction ID.
- public DbLsn lsn;
- The Lsn of the begin record.
The DbTxnMgr.stat
method throws an exception that encapsulates an errno on failure.
Errors
If a fatal error occurs in Berkeley DB, the DbTxnMgr.stat method may fail and throw a
DbRunRecoveryException, at which point all subsequent database
calls will also fail in the same way.
The DbTxnMgr.stat
method may fail and throw an exception
for any of the errors specified for the following Berkeley DB and C library
functions:
abort(3),
fcntl(3),
fprintf(3),
getpid(3),
malloc(3),
and
memset(3).
Class
DbTxnMgr
See Also
DbTxnMgr.begin,
DbTxnMgr.checkpoint,
DbTxnMgr.close,
DbTxnMgr.open,
DbTxnMgr.stat
and
DbTxnMgr.unlink.


Love learning new programming languages and developing stuff using it
Some of my skills which I love working with
Feel free to contact for any new work on xyx


Update view
Airlane has supported jade template (It's default, you can change template engine you like). Your index file localed to hello/routes/views/index.jade.
Edit index.jade, Web browser reloads view automatically.
Auto re-deply
When you edit server-side JavaScript code, Airlane immediately reflects it. You don't need to restart server by hands.
Auto generate client-side JavaScript and Stylesheet
Airlane supports ECMA2016 JavaScript on Web browser. It's convert to ECMA5 by babel. And Airlane provides browserify, so you can use npm module in your client JavaScript code. Normarl JavaScript code is generated by Airlane automatically. Your JavaScript locates to hello/routes/public/app.js, and converted file locales to hello/routes/public/app.min.js. This JavaScript file is loaded by HTML file in hello/routes/views/layout.jade, so you don't need care about it.
npm with JavaScript
You can use client JavaScript with npm packages such as bootstrap, react, jQuery, or Vue. If you want to use bootstrap, at first you should install bootstrap on npm.
npm install bootstrap --save
And you write code in your JavaScript file located hello/routes/public/app.js.
global.jQuery = global.$ = require('jquery');
require('bootstrap');
Your JavaScript file hello/routes/public/app.min.js will update soon, and you can use it.
ECMA2016 code syntax
Airlane supports ECMA2016 syntax in client JavaScript. When you use jQuery, you can write it like below to hello/routes/public/app.js.
$(() => {
$("a").each((i, k) => {
this.on('click', e => {
// You code is here.
})
});
})
Those code are converted to ECMA5 JavaScript by Babel. Generated code located to hello/routes/public/app.min.js.
npm with Stylesheet
Airlane supports load stylesheet file in npm package, too. It's limited feature, but it supports bootstrap. If you want to use bootstrap, execute command first.
npm install bootstrap --save
And you write a line in your stylesheet file located hello/routes/public/app.css.
@import bootstrap;
Your stylesheet file hello/routes/public/app.min.css will update soon with bootstrap stylesheet.


-
What is Bd Ads?
- Bd Ads is now one of the leading e-commerce organizations in Bangladesh from where you can buy book/electronics/accessories, CDs/DVDs(Tutorials) and gift items. You can order online or by phone (16297) and can pay after receiving your goods.
-
Which types of product are available in Bd Ads?
-Currently you will find all types of Books, Electronics and Gift Card products in Bd Ads.
-
Which kind of books are available in Bd Ads?
- In Bd Ads you will find different kind of books. We store books from almost every publisher in this country and also store many originally printed books from other countries. At this moment in Bd Ads you can find books from more than 40 catagories (such as- Translated books, Politics, Religious, Medical and Engineering, History, Science, Fiction, Non- fiction, etc). More over 1 lac books are in collection of Bd Ads,and everyday new books are adding to this huge collection.
-
If i can't find any particular product in Bd Ads then what should I do?
- If you can't find any particular product in Bd Ads website then you can call to our customer care line (16297) and ask for that particular product. We will then search that product in the market or contact the company and try to collect that.
-
Can I get any idea about any product before buying it?
- Yes, you certainly can. You can get idea about any product by clicking the product name in our website. Then there will open a page of that particular product with proper description and pricing. You can also see there rating and review system where customers gave their feedback and reviewed that item. It will certainly help you to take your decision.
-
How can I order from Bd Ads?
- There are 2 procedures to order from Bd Ads.
If you want to buy from online you just have to go to our website www.Bd Ads and then search your desired product. You can search category wise also and buy it from there. You just have to click "Buy Now" option and that product will be stored in your cart. You can further order with the given instructions there.
For phone order you can call to our customer care line - 16297 or 015 1952 1971 and our customer care executive will help you find your desired products and order those for you.
-
What is Gift Card!
- Bd Ads offers you "Bd Ads Gift Card" as a token of trust for your continuous support and love for Bd Ads. You can purchase this gift card from our website and gift it to your dear ones or yourself also. By having this gift card you can enjoy various discount offers and purchase products from Bd Ads very easily..
-
What is Promo Code?
- Promo code is a secret number scratch card which is given to the loyal customers of Bd Ads in different occasions. Customers can use this code in every order and get discounts. In phone order customers can tell the code to our C.c executives and in online order there is box where the code has to be put in. Customers can get upto 25% discount bu using this promo code.
-
What is 'Gift Coupon'? How can I get it?
- Gift Coupon is a new service of Bd Ads. You can buy this gift coupon from Bd Ads as a product and use it for buying products and you can gift this coupon card for your dear ones. If your coupon costs more than the product you bought then the rest of your money will go to your wallet and you can use that in future for buying products.
-
What is the Service/Shipping charge of Bd Ads?
- You can buy any products at the cheapest shipping charge from Bd Ads. Online order shipping charge is 40 tk/- and Phone order shipping charge is 60 tk/- only.
-
What is the normal delivery time for Bd Ads?
- Normally we take 2-10 days to deliver the parcel.
-
What if I find any problem in the delivered products, then what should I do?
- It's a rare case for Bd Ads where customer didn't get their products unharmed. But sometimes we may fail to fulfill your expectations, sometimes situations aren't by our side. But there is a bond of trust between customers and Bd Ads, so that Bd Ads brings to you The "Happy Return" policy. Where customers can return their book or product if there's something wrong with it. In that case Bd Ads will give you a fresh product in return. We call this policy of ours "Happy Return" .
-
Is there any other products I can find in Bd Ads beside books?
- Yes. At this moment We have electronics, Accessories and Gift Card . You can also find the first ever science kit in Bangladesh "OnnRokom BigganBaksho" in our website.
-
How can I gift my beloved ones by using your service?
- You can now gift your beloved ones easily from Bd Ads. You can call to our Customer care line- 16297 or 015 1952 1971 . You can also order online and at the end of the order choose "place order to gift" by giving the proper mailing address of your dear ones. For gifting you have to pay the product price and delivery charge first. You can purchase this gift card from our website and gift it to your dear ones or yourself also
-
What are the payment options in Bd Ads?
- Cash On Delivery (COD) , Mobile payment(bkash,Rocket), SSL commerze and PAYZA
-
How can I buy products from another country?
- Bd Ads provides your desired products and books no matter which country you lived in. You can order products from here and we will parcel it to you. In this case you have to pay the price of the product and weight-wise delivery charge first. You can order your products in the same way, by Online and Phone.
-
What is Guest Order?
- Using this feature you can buy product from Rokomrai.com without any account
-
What is 'Backorder'?
- Many times we don't have the books you like to order because they are out of stock. But now Bd Ads is adding "Backorder" option so that you can order the 'out of stock' books/products and when they are available we can notify you about it and thus take a order and make you happy. Your happiness is our gaining.
-
What is 'Wallet'?
- Wallet is your piggybank from where you can buy products easily without any hassle. You don't need to pay cash on delivery or something, we'll just cut the amount from your wallet and deliver you the products you ordered.
-
How can I complain over or convey my satisfaction to Bd Ads?
- Bd Ads always wants to hear the customer's say whether it's a complain or admiration. You can mail us at
[email protected]
-
What is 'Quick View'?
- Now online shopping is much more easier in Bd Ads. Because we add quick view option where you can see a quick view with some details of the product. Firstly you have to move the mouse cursor to your desired product and you will see a quick view option. Just click it and a pop out will show you a quick view of the product.
-
What is 'View Insider'?
- View Insider is a new feature in Bd Ads, now visit to book details page and click 'View Insider' link from product image
-
What is 'JHOKOMARI'?
- To celebrate holidays, anniversaries or to pay respect to the authors, artists, and renowned people on their demises there is a team of illustrators and brainstorms who made some spontaneous changes to the Bd Ads logo, is called Jhokomari. Jhokomari is not just a regular image, it portraits the "Bd Ads" logo with an inner meaning.
-
Why should I donate to Bd Ads?
- Happiness is only real when it shared. Struggling with time is the ultimate fate in the concept of struggle but despite all, people have a right to smile and some people have good heart to make them smile. Bd Ads encourages you to use this platform to bring up happiness and smile among those, Apart from all that we don't think ourselves into new way of acting but we act ourselves into a new way of thinking in sharing smile.
-
What is 'Testimonial'?
- Testimonial is an option for getting a feedback from our customers about our website as well as our services. One can easily click the "Testimonial" option and then give us the feedback.
-
How can I 'submit a ticket'?
- There is a "Submit Ticket" option in our website. If you can't find your answers and aren't satisfy about them then you can question us by submitting a ticket. There are options (Technical, Order Process, Payment Process, Product Query, Others) that can relate to your problems. You can choose one of them and write down your question with details and attach needed files (screenshots, pictures, etc.) and send it to us. We'll surely reply and try our best to solve your problems.
-
How can I make a list in Bd Ads website and why should I make it?
- You can make a list with your desirable products and books so that you can buy those in near future and to suggest your choice of products/books to all the customers/readers to help them out for making a choice when they're buying.
-
How can I send a book/product link to my friends/dear ones?
- You can easily send a book/product link with your message from our website. You just need to open the book/product details link and below the product image you can find 'Send' option. You have to click it then and write down the e-mail id of the person whom you want to send and your message and submit it. We'll send it for you.
-
How can I share a book/product link in social media?
- You just need to open the book/product details link and below the product image you can find 'Share' option. You have to click it, copy the link and choose one of the social medias (Facebook, Twitter, Google+), and then share it.
-
What is 'Wish list'?
- Customer satisfaction is our primary target so if a customer like a book/product but can't afford it that particular moment then they can easily add that product to his/her wish list. So that he/she can buy it in future by checking his/her wish list. After all your wish is our priority.
-
How can I subscribe Bd Ads?
- You can easily subscribe Bd Ads by adding your mail address and we'll regularly give you the updates, offers, lots more by mailing it to you. You can find our subscribe option in the footer portion of our website.


Milky Way
Sun
Mercury
Venus
Earth
Mars
Jupiter
Saturn
Man
Way
The Milky Way
The Sun
The Mercury
The Venus
The Earth
The Mars
The Jupiter
The Saturn
We are here
We are here
We are here
Previous
Next


Options - options class (pynance.opt.core
)¶
-
class
pynance.opt.core.
Options
(df)[source]¶ Options data along with methods for easy access to desired information.
New in version 0.3.0.
Objects of this class are not intended for direct instantiation but are created by calling
get()
Parameters: df :
pandas.DataFrame
Dataframe containing the options data.
Examples
Just retrieve data (no info message):
>>> geopt = pn.opt.get('ge')
or retrieve data with info:
>>> fopt, fexp = pn.opt.get('f').info() Expirations: ... Stock: 16.25 Quote time: 2015-03-01 16:00
Attributes
data ( pandas.DataFrame
) Options data.price ( Price
) Wrapper containing methods for determining price.spread ( Spread
) Wrapper containing methods for evaluating spreads.Methods
-
info
()[source]¶ Show expiration dates, equity price, quote time.
Returns: self :
Options
Returns a reference to the calling object to allow chaining.
expiries :
pandas.tseries.index.DatetimeIndex
Examples
>>> fopt, fexp = pn.opt.get('f').info() Expirations: ... Stock: 16.25 Quote time: 2015-03-01 16:00
-
quotetime
()[source]¶ Time of quotes
Returns: qt : datetime.datetime
-


South Africa’s Pepkor to close loss-making Zimbabwe business
by Staff ReporterJOHANNESBURG (Reuters) – South African retailer Pepkor Holdings said on Monday it will exit Zimbabwe after an economic crisis in the country hurt its performance.
Severe shortages of foreign currency, fuel and electricity have sent inflation soaring to its highest since 2008, and dashed hopes the economy might recover under President Emmerson Mnangagwa, who took over from Robert Mugabe in 2017.
“The decision to exit Zimbabwe was based on the continued adverse macroeconomic conditions affecting trading and the weakening currency,” Pepkor’s statement said.
Its Zimbabwe business made a loss of 70 million rand ($4.8 million), including the full impairment of the disposal of the group’s assets, it added.
Overall, Pepkor, 71% owned by scandal-hit retailer Steinhoff International, said its profits grew by 14.5% in the year to Sept. 30.
Headline earnings per share, the main profit measure in South Africa that strips out certain one-off items, stood at 96.8 cents, verses 84.5 cents a year earlier. Revenues from continuing operations grew by 9% to 69.6 billion rand.
Pepkor flagged earlier in November that it would need to take a 1.2 billion rand charge related to its building materials unit that has struggled in a tough market.
Leon Lorens, Pepkor’s CEO, said the company was satisfied with its performance given the difficult retail environment in South Africa.
Consumer finances have been constrained amid stagnant growth, rising living costs and unemployment that stands at nearly 30%.
“We see many opportunities for market share expansion,” Lorens said, adding the company was also focused on cutting costs.


At Sarah's Bakery we are cake artists with a love for creating the sweetest part of your celebration.
Chocolate Mocha Cake
Chocolate Butterscotch Cake
Buttercream Vanilla Cake


Toolbox for the manipulation, description and rendering of sequences, and more generally the mining of sequence data in the field of social sciences. Although the toolbox is primarily intended for analyzing state or event sequences that describe life courses such as family formation histories or professional careers, its features also apply to many other kinds of categorical sequence data. It accepts many different sequence representations as input and provides tools for converting sequences from one format to another. It offers several functions for describing and rendering sequences, for computing distances between sequences with different metrics (among which optimal matching), original dissimilarity-based analysis tools, and simple functions for extracting the most frequent subsequences and identifying the most discriminating ones among them. A user's guide can be found on the TraMineR web page.
| Version: | 2.0-10 |
| Depends: | R (≥ 3.0.0) |
| Imports: | utils, RColorBrewer, boot, graphics, grDevices, stats, Hmisc, cluster |
| Suggests: | xtable |
| Published: | 2018-11-18 |
| Author: | Alexis Gabadinho [aut, cph], Matthias Studer [aut, cph], Nicolas Müller [aut], Reto Bürgin [aut], Pierre-Alexandre Fonta [aut], Gilbert Ritschard [aut, cre, cph] |
| Maintainer: | Gilbert Ritschard <gilbert.ritschard at unige.ch> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| URL: | http://traminer.unige.ch |
| NeedsCompilation: | yes |
| SystemRequirements: | C++11 |
| Citation: | TraMineR citation info |
| Materials: | NEWS |
| In views: | Survival |
| CRAN checks: | TraMineR results |
| Reference manual: | TraMineR.pdf |
| Vignettes: |
Analyzing and Visualizing State Sequences |
| Package source: | TraMineR_2.0-10.tar.gz |
| Windows binaries: | r-devel: TraMineR_2.0-10.zip, r-release: TraMineR_2.0-10.zip, r-oldrel: TraMineR_2.0-10.zip |
| OS X binaries: | r-release: TraMineR_2.0-10.tgz, r-oldrel: TraMineR_2.0-10.tgz |
| Old sources: | TraMineR archive |
| Reverse depends: | lifecourse, MmgraphR, PST, TraMineRextras, WeightedCluster |
| Reverse imports: | DBHC, DySeq, seqHMM |
Please use the canonical form https://CRAN.R-project.org/package=TraMineR to link to this page.


This chapter shows how you might get started writing a simple GEOS program, and it explains several fundamental GEOS programming concepts as it goes along. Although this tutorial explicitly refers to the Nokia 9000 SDK version 1.1, it is also applies to the Nokia 9000i SDK version 2.0.
Getting Started with GEOS Programming
Tutorial
Tutorial Source Code
Adding Code and Debugging with Swat
Tutorial Source Code With Changes
Before jumping into writing your own application, it might be useful to compile and run an existing sample application. This chapter will take you through the generic steps of checking out a source file, compiling it, then running the compiled application on the emulator with the Swat debugger attached. The next two chapters explore GEOS development in greater detail by stepping through every step in creating the application "Tutorial". We recommend that you step through this chapter to acquaint yourself with the generic process of compiling an application, then carefully follow the tutorial to get a flavor for GOC, Swat debugging, and Geode Parameter files.
Typically, your development sequence will follow these steps:
mkmf
utility;
pmake
utility;The next section follows this sequence using the Dialogs sample application, though of course the same steps apply for any sample application. (Refer to the release notes in the README.TXT file or the Troubleshooting guide in the "Installing the SDK" chapter if you encounter problems.)
In the directory paths below, prepend your correct drive letter or path to PCGEOS and replace "workingdir" as appropriate. Also note that if you are using the Nokia 9000i SDK version 2.0, the directory labled here as N9000v11
will be N9000v20
in your development branch.
CD PCGEOS\workingdir\APPL
MD SDK_9000\DIALOGS CD SDK_9000\DIALOGS
COPY \PCGEOS\N9000V11\APPL\SDK_9000\DIALOGS\DIALOGS.GOC
mkmf
to create the makefile.
pmake
to compile and link the executable. This will create an error-checking version called
DIALOGSEC.GEO
.
start ss
.
start pcgeos\bin\swat
. (The full path is only necessary if there is also a Swat stub in your current directory, which you
do not
want to run.)
c
to continue.
Ctrl-W
to clear the "Where is it" default; then type
i
(lower-case) to ignore that file.
Ctrl-C
, then using the
Ctrl-W
,
i
sequence described above to ignore the file.
Ctrl-C
in the Swat window to bring command control back to Swat.
send dialogs
.
c
to continue Swat.
Ctrl-F12
to launch the Extras folder.
F1
to launch it. (The keys F1 - F4 correspond to the menu list on the right of the emulator window.)
Ctrl-C
to bring command control back to Swat, then type
quit
to exit the emulator.In this section, you learned how to check out a source code file by copying it from the Branch directory to your Working Directory, and then compile and run it on the emulator. Notice that it was not necessary to copy all the files from the \DIALOGS\ subdirectory in the N9000v11 Branch. When compiling and linking, the tools are smart enough to look for files in your Working Directory first and then look for whatever other files it needs in the Branch directory. This allows you to copy only the file or files you need to work on; shared files can remain in the Branch directory.
Now that you've gone through the basic steps of compiling and running a GEOS application, you can go on to the next chapter to create your own application from scratch.
In this tutorial, you will create a simple GEOS application that draws text and demonstrates the basic components of a GEOS application. You'll learn how to compile and link the application and explore its source code using the Swat debugger.
1 Creating "Tutorial"
1.1 Setting Up Your Working Directory
1.2 Compiling Your Source Code
1.3 Starting the Emulator and Swat
2 Learning GOC
2.1 TUTORIAL.GP: Geode Parameters File
2.2 TUTORIAL.GOC: Source Code
3 Exploring With Swat
4 Source Code
The application that you'll be working on throughout this tutorial is called, appropriately enough, "Tutorial." In this section you'll create two files: TUTORIAL.GP and TUTORIAL.GOC. The .GP (or "geode parameters") file tells the linker how the application is organized; the .GOC file contains the actual source code. All GEOS applications require these two files.
The first step in creating your application is to set up your Working Directory where you will do all your private development. Because your application is called "Tutorial," you need to create a \TUTORIAL\ subdirectory in your Working Directory to hold the source files (see "Developing In Your Working Branch" for more information).
Now that you've created some source code, it's time to compile your application. First, you will need to create a Makefile and then run the "make" or compilation utility.
When you have completed these steps, your directory should contain some new files, including TUTORIALEC.GEO and your newly created GEOS executable or "geode." The "EC" in the name indicates that you've compiled the error-checking version of your application. The GEOS SDK tools have been set up with some optional compilation features to allow for error-checking code which is useful during development.
Once you've successfully compiled your code, it's time to start up the GEOS emulator and attach Swat, the debugger.
Swat version 2.1 (Feb 14 1997 19:05:55). Using the N9000V11 version of GEOS. SDK version: ntsdk30 Looking for "loader"...c:/pcgeos/N9000V11/Installed/Loader/Text/loaderec.sym Sourcing swat.tcl...done GEOS Attached Stopped in LoadGeos, address 0a06h:0007h LoadGeos: CLD ;DF=0 (loader:0) 1 =>
At this point, Swat is telling you that it has successfully established communications with the target emulator, has started the process of loading the GEOS kernel, and is now waiting for you to type in a command. Type
c
and press the <Enter> key to continue loading the GEOS emulator. The following will appear:
Swat version 2.1 (Feb 14 1997 19:05:55). pcgeosGEOS Attached Stopped in LoadGeos, address 0a06h:0007h LoadGeos: CLD ;DF=0 (loader:0) 1 => save screen1.txt Saving to c:/pcgeos/nfiedler/screen1.txt: 1000 lines (loader:0) 2 => c Looking for "geos Eker"...c:/pcgeos/N9000V11/Installed/Library/Kernel/N9000DE MO/geosec.sym Looking for "os2 Eifs"...c:/pcgeos/N9000V11/Installed/Driver/IFS/DOS/OS2/os2 ec.sym Looking for "netware Eifs"...c:/pcgeos/N9000V11/Installed/Driver/IFS/DOS/NetWare /netwareec.sym netware exited. Looking for "respondrElib"...c:/pcgeos/N9000V11/Installed/Library/Respondr/N9000 DEMO/respondrec.sym Looking for "rspwr Edrv"...c:/pcgeos/N9000V11/Installed/Driver/Power/Rspwr/N90 00DEMO/rspwrec.sym Thread 1 created for patient geos Thread 2 created for patient geos Looking for "vidmem Edrv"...c:/pcgeos/N9000V11/Installed/Driver/Video/Dumb/VidM em/vidmemec.sym Looking for "swap Elib"...c:/pcgeos/N9000V11/Installed/Library/Swap/swapec.sy m Looking for "disk Edrv"...c:/pcgeos/N9000V11/Installed/Driver/Swap/Disk/diske c.sym Looking for "xms Edrv"...c:/pcgeos/N9000V11/Installed/Driver/Swap/XMS/xmsec. sym Looking for "gdi Elib"...c:/pcgeos/N9000V11/Installed/Library/GDI/GenPC/WIN3 2/gdiec.sym Looking for "gdiKbd Edrv"...c:/pcgeos/N9000V11/Installed/Driver/Keyboard/GDI/gd iKbdec.sym Looking for "nimbus Edrv"...c:/pcgeos/N9000V11/Installed/Driver/Font/Nimbus/nim busec.sym Looking for "stream Edrv"...c:/pcgeos/N9000V11/Installed/Driver/Stream/streamec .sym Looking for "sound Elib"...c:/pcgeos/N9000V11/Installed/Library/Sound/N9000/so undec.sym Looking for "standarddrvr"...c:/pcgeos/N9000V11/Installed/Driver/Sound/Standard/ N9000DEMO/standard.sym Looking for "ui Elib"...c:/pcgeos/N9000V11/Installed/Library/User/N9000/uie c.sym Thread 0 created for patient ui Looking for "styles Elib"...c:/pcgeos/N9000V11/Installed/Library/Styles/N9000/s tylesec.sym Looking for "color Elib"...c:/pcgeos/N9000V11/Installed/Library/Color/N9000/co lorec.sym Looking for "ruler Elib"...c:/pcgeos/N9000V11/Installed/Library/Ruler/N9000/ru lerec.sym Looking for "text Elib"...c:/pcgeos/N9000V11/Installed/Library/Text/N9000/tex tec.sym Looking for "rtcm Elib"...c:/pcgeos/N9000V11/Installed/Library/RTCM/rtcmec.sy m Looking for "ansic Elib"...c:/pcgeos/N9000V11/Installed/Library/AnsiC/ansicec. sym Looking for "vp Elib"...c:/pcgeos/N9000V11/Installed/Library/Foam/OEM/vp_st b/vpec.sym Looking for "foam Elib"...c:/pcgeos/N9000V11/Installed/Library/Foam/Foam/foam ec.sym Looking for "foamdb Elib"...c:/pcgeos/N9000V11/Installed/Library/Foam/DB/foamdb ec.sym Looking for "contdb Elib"...c:/pcgeos/N9000V11/Installed/Library/Foam/Contdb/co ntdbec.sym WARNING(foamdb::FoamDBVisibleRecordEnumWithRange): DB_ENUM_START_ELEMENT_TOO_LAR GE Looking for "securitylib "...c:/pcgeos/N9000V11/Installed/Library/Foam/Security/ security.sym Looking for "rudy Espu"...c:/pcgeos/N9000V11/Installed/Library/SpecUI/Rudy/ru dyec.sym Looking for "simp4bitEdrv"...c:/pcgeos/N9000V11/Installed/Driver/Video/Dumb/Simp 4Bit/WIN32/simp4bitec.sym WARNING(rudy::OLAppEnsureIndicatorCorrect): RUDY_INDICATOR_NOT_FOUND_IS_GEOS_BOO TING_OR_SHUTTING_DOWN Looking for "spool Elib"...c:/pcgeos/N9000V11/Installed/Library/Spool/N9000/sp oolec.sym Thread 0 created for patient spool Looking for "mailbox Elib"...c:/pcgeos/N9000V11/Installed/Library/Mailbox/N9000/ mailboxec.sym Thread 0 created for patient mailbox Looking for "nonts Edrv"...c:/pcgeos/N9000V11/Installed/Driver/Task/NonTS/nont sec.sym Looking for "contlog Elib"...c:/pcgeos/N9000V11/Installed/Library/Foam/ContLog/c ontlogec.sym Looking for "indicatoEapp"...c:/pcgeos/N9000V11/Installed/Appl/FApps/OEM/indicat o/indicate.sym Thread 0 created for patient indicato Looking for "faxfile Elib"...c:/pcgeos/N9000V11/Installed/Library/Fax/File/N9000 /faxfileec.sym Looking for "viewer Elib"...c:/pcgeos/N9000V11/Installed/Library/Foam/Viewer/vi ewerec.sym Looking for "clrfax Egeo"...c:/pcgeos/N9000V11/Installed/Appl/FApps/ClrFax/clrf axec.sym Thread 0 created for patient clrfax Looking for "math Elib"...c:/pcgeos/N9000V11/Installed/Library/Math/mathec.sy m Looking for "ssset Elib"...c:/pcgeos/N9000V11/Installed/Library/Foam/OEM/ssset /sssetec.sym Looking for "scm Elib"...c:/pcgeos/N9000V11/Installed/Library/Foam/OEM/scm/s cmec.sym Thread 0 created for patient scm Looking for "compose Elib"...c:/pcgeos/N9000V11/Installed/Library/Foam/OEM/compo se/composee.sym Looking for "borlandcElib"...c:/pcgeos/N9000V11/Installed/Library/Math/Compiler/ BorlandC/borlandcec.sym Looking for "phone Eapp"...c:/pcgeos/N9000V11/Installed/Appl/FApps/OEM/phone/p honeec.sym Thread 0 created for patient phone Thread 1 created for patient indicato Thread 1 of indicato exited 0 viewer exited. faxfile exited. clrfax exited. Thread 0 of clrfax exited 0 Looking for "serial Edrv"...c:/pcgeos/N9000V11/Installed/Driver/Stream/Serial/s erialec.sym serial exited. GEOS Halted Stopped in DOSIdleHook, address 2796h:1136h DOSIdleHook+17: MOV AX, 5760 (1680h) (geos:0) 3 =>
Each line that begins "Looking for..." indicates that the system is loading a geode (a GEOS executable) and that Swat is looking for its symbol information. Swat also tells you whenever it creates (or exits) a thread for any geode.
Now that the emulator is running with Swat attached, you need to send your source code to the emulator to run it.
Ctrl-C
in the Swat window. At this point, the Swat prompt should appear.
send tutorial
to copy the application to the emulator.
run tutorial
to run the application.
c
to allow execution to continue on the emulator.
After you've followed these steps, your emulator should look like
the screen pictured below.
|
Figure 1: The "Tutorial" application screen. This is how your application will look after you type in the first pieces of code. Notice that it consists only of a blank viewing window and a "Close" button; later you will add code that displays text in this window. |
As you can see, your application consists of an empty window. In the next chapter, you will add procedural code that draws a text string in this window.
By typing in the contents of the source files (both the .GOC and .GP files), you've probably become a little familiar with GOC syntax. GOC is a proprietary superset of standard ANSI C. It supports C routines and functionality and adds its own set of keywords and special syntax. This section will cover basic GOC syntax, including the usage and meaning of various GOC keywords, by giving a line-by-line explanation of the code you entered.
The .GP file tells the Glue linker about an application's general organization. (You can get complete information about all of the possible fields in a .GP file by reading the GP File Keywords reference.) Let's take a look at the code in TUTORIAL.GP to find out what each line means.
name tutorial.app
The
name
field specifies the "patient" name by which Swat will identify the application. Swat thinks of each geode as a patient, so you'll see phrases in Swat like "patient died".
longname "Tutorial Sample Application"
The
longname
field is the name the system displays for this application. For example, if you press
Ctrl-F12
on the emulator (to list the applications in the "Extras" folder), you will see the
longname
for this application displayed. GEOS supports names up to 32 characters in length.
tokenchars "TUTO" tokenid 8
Each application has its own unique identifier to the system. This identifier is a special GEOS data type called a
GeodeToken
. A
GeodeToken
is a data structure comprised of two fields:
tokenchars
tokenid
GeodeTokens
do not conflict with those of other manufacturers. All sample applications, including this tutorial application, use a
tokenid
of 8; for your "real" applications, you should use your company's assigned Manufacturer ID. (Send email to
<EMAIL_ADDRESS>to receive a Manufacturer ID.)type appl, process, single
The type
line tells Glue whether your geode is an application, a driver or a library.
Tutorial, like most GEOS applications, uses the following keywords:
appl
which tells Glue that this geode is an application;
process
which specifies that the geode should be run in its own thread;
single
which specifies that only one copy of the program may run at a time.Because GEOS is a multi-tasking or multi-threaded operating system, it allows more than one thread of execution to run at a time. This enables programs to run in the background. By specifying that your application has a process, you are requesting that it have its own thread of execution. If you were writing a library, you probably wouldn't want to give it a process, figuring that other geodes would be executing the library's code.
class TutorialProcessClass
The
class
line specifies which class will run the process thread. In this case, the
TutorialProcessClass
will be in charge of the process thread. (You will declare
TutorialProcessClass
in the
TUTORIAL.GOC
file.)
appobj TutorialApp
The
appobj
line specifies the "application object" for this application. The application object is the interface between your geode and the rest of the system. (You will declare this object in your source file as well.)
platform n9000v20
Glue will use the
platform
line to make sure that your application doesn't rely on any geodes that aren't present on the GEOS device.
heapspace 3K
The
heapspace
line specifies the maximum amount of memory the application requires on the global memory heap. Note that the value 3K is a wild guess. Once your application is closer to completion, you can use Swat's
heapspace
command to find out how much heap space the application really needs.
library geos library ui
The
library
lines tell Glue which libraries to load for your application. All GEOS libraries are dynamically linked and loaded.
resource APPRESOURCE ui-object resource INTERFACE ui-object
The
resource
lines specify the blocks of memory that your application uses for objects. Breaking up an application into resources allows it to run more efficiently because the system will only load those resources it needs.
The ui-object
keyword signals that the UI thread should run the specified resource. Specifying a UI thread ensures that your application will
have
a UI thread and thus be dual-threaded: the process will run in one thread and UI objects will run in the UI thread. If you don't want the application to have two threads, use the keyword
object
instead of
ui-object
.
Now let's take a look at the source code in TUTORIAL.GOC . (For more information about GOC syntax, see the GEOS Programming chapter.)
@include <stdapp.goh> @include <foam.goh>
The first lines of code contain the
@include
directive. Note the '@' symbol. This symbol is used to denote GOC keywords and distinguish them from regular C syntax.
@include
behaves the same way as
#include
, except that the inclusion will take place when the GOC preprocessor is processing the source code. Generally, you
@include
.GOH files and
#include
regular .H files.
@class TutorialProcessClass, GenProcessClass; @endc;
The
@class
and
@endc
keywords mark the beginning and end of a new class definition. Here, you're defining
TutorialProcessClass
as a subclass of
GenProcessClass
, which means that
TutorialProcessClass
will inherit all the behavior of its parent,
GenProcessClass
.
@classdecl TutorialProcessClass, neverSaved;
Once you define the class, you need to declare it so that the system will know how to build objects of that class. To declare the class, you use the
@classdecl
keyword and because this is the process object, (a special object with no instance data), you also use the
neverSaved
flag. This flag tells the system that no instance data need be saved when the system shuts down.
@start AppResource;
The
@start
keyword defines a resource or block of memory. In this case, you're defining the APPRESOURCE resource. In the
.
GP file, you may recall that this resource holds objects, and that those objects will be run by the UI thread.
@object FoamSubApplicationClass TutorialApp = {
The first object to be declared in the APPRESOURCE resource is the application object,
TutorialApp
. In the .GP file, you specified
TutorialApp
as the application object in the
appobj
line. The application object is responsible for receiving and handling all sorts of system messages and notifications. This is a nontrivial task so the object will be of a class specifically set up to handle this task:
FoamSubApplicationClass
. (Note, on GEOS systems other than the Nokia 9000i Communicator, you would use a
GenApplicationClass
;
FoamSubApplicationClass
is a specialized subclass of
GenApplicationClass
.)
Because the application object provides important information to the system, it needs to live in its own resource; that way, the system can query the application object by loading only that resource which contains it.
The next set of fields contains the application object's instance data. Instance data are characteristics of an object, as defined by the object's class. (This should make more sense as you read on.)
GI_visMoniker = list{ @TutorialTextMoniker };
The GI_visMoniker
field specifies the object's label or name that appears to the user (not to be confused with
TutorialApp
, the name of the object).
The "visMoniker" part of the field name is short for "visual moniker." In GEOS parlance, a "visual moniker" is a text string or graphic used to identify an object to the user. This field is commonly set to a "list" of monikers; the system uses the moniker list to determine which text or graphic to display for your application.
GI_comp = @TutorialPrimary;
The
GI_comp
field specifies the children of a generic UI object. In this case, the only child of the
TutorialApp
object is the
TutorialPrimary
object (which you declare later). (For a detailed description of how objects keep track of their children, see the GEOS Programming chapter.)
Notice that both instance data field names begin with "GI_." The "GI_" stands for "Gen Instance." Because
GenApplicationClass
is a subclass of
GenClass
, it inherits the
GI_visMoniker
field from its parent. By Geoworks' naming conventions, instance data field names begin with the initials of their associated class followed by an "I" for "instance." Thus, any
GenApplicationClass
instance field names would begin "GAI_."
You may be wondering about the syntax for @TutorialPrimary
.
@TutorialPrimary
is actually a reference to the
TutorialPrimary
object. Object references have their own GEOS-specified type called an
optr
.
gcnList( MANUFACTURER_ID_GEOWORKS, GAGCNLT_WINDOWS ) =@TutorialPrimary; }
This line puts the
TutorialPrimary
object,which is the primary window of your application, on a General Change Notification (GCN) list so that it will receive notification when a system-level change has occurred. (For more information about GCN lists, see the gcnList entry in the GEOS Programming chapter.)
This completes the declaration of the
TutorialApp
object.
@visMoniker TutorialTextMoniker = "My Tutorial";
This line contains the string to which the
TutorialApp
's
GI_visMoniker
field refers. The
@visMoniker
keyword stores the string in a GEOS data structure set up strictly for monikers.
@localize "Program Title";
This
@localize
statement doesn't actually affect the program; it simply acts as a hint for someone translating the program to a foreign language. The ResEdit program displays the information in
@localize
statements when it prompts the translator to translate a moniker or string chunk. In this case, for example, when ResEdit prompts the translator to translate the string, "My Tutorial," it will display the string "Program Title" to assist with the translation.
@end AppResource
This line signals the end of the APPRESOURCE declaration.
@start Interface;
Here begins the next resource definition. This resource is called INTERFACE and will hold the basic UI gadgetry for your application.
@object GenPrimaryClass TutorialPrimary = {
The first object to be declared in this resource is
TutorialPrimary
, your application's primary window and an object of
GenPrimaryClass
.
GI_comp = @TutorialView, @TutorialCloseTrigger; }
The first instance data field is
GI_comp
, which specifies the children of
TutorialPrimary
.
@object GenViewClass TutorialView = {
The next object is a
GenViewClass
object called
TutorialView
; this object provides space on the screen for objects to draw themselves.
GVI_horizAttrs = @default | GVDA_NO_LARGER_THAN_CONTENT; GVI_vertAttrs = @default | GVDA_NO_LARGER_THAN_CONTENT; GVI_content = process; }
The
GVI_content
field specifies the top-level object which will appear in the view's drawing space. The
GVI_horizAttrs
and
GVI_vertAttrs
fields specify how the view should size itself in relation to the
content
object's size. Setting the flag GVDA_NO_LARGER_THAN_CONTENT
ensures that the view will be the same size as its content object.
Notice that the
GVI_...Attrs
fields also use the
@default
keyword.
@default
tells the system to expand to the default values for this field (as defined by
GenViewClass
); additional flags are ORed in with the single pipe ("|").
@object GenTriggerClass TutorialCloseTrigger = { GI_visMoniker = "Close";
The last object declared in the INTERFACE resource is
TutorialCloseTrigger
, an object of
GenTriggerClass
.
TutorialCloseTrigger
provides the "Close" button for your application.
GTI_destination = @TutorialApp; GTI_actionMsg = MSG_FSA_RETURN_TO_LAUNCHER;
The GTI_destination
and GTI_actionMsg
fields are GenTrigger instance data fields. GTI_actionMsg
specifies the message that gets sent when the user presses the "Close" button; GTI_destination
specifies the object who will handle the message. (We will discuss messages in more detail in the next chapter; suffice it to say that a message is a signal which may be handled by a set of procedural code defined for a class.)
HINT_SEEK_MENU_BAR; HINT_SEEK_REPLY_BAR; HINT_SEEK_SLOT = 3; }
These hints ensure that the button is placed on the right side of the screen so that it aligns with the buttons on the Nokia 9000i Communicator.
@end Interface;
This line signals the end of the INTERFACE resource definition.
Now that you've successfully compiled your application, you can use Swat to "debug" it. In the Swat window, press
Ctrl-C
to halt the emulator and gain control back in the Swat window. Something similar to the following should appear in your Swat window:
GEOS Halted Stopped in DOSIdleHook, address 277eh:1136h DosIdleHook+17 MOVE AX, 5760 (1680h) (geos:0) 5 =>
"GEOS Halted" indicates that Swat has frozen the emulator. The next two lines of Swat output indicate the address of the current internal routine that is executing. If Swat stopped in a public routine, the address would have been given in relation to the routine name and would have been more readable.
The last line indicates the thread that was executing (on the emulator) when you hit
Ctrl-C
. In this example, the zeroth thread associated with the GEOS geode (the kernel) was executing. To examine the thread associated with your application, type "tutorial." (Recall that this is the value you set in the
name
field of your
TUTORIAL.GP
file [without the suffix].) This tells Swat which thread to switch to.
(geos:0) 5 => tutorial [tutorial:0] 6 =>
The prompt indicates that you are now in the process thread of the
tutorial
geode. If you were in the UI thread, your prompt would read "[tutorial:1]." To change threads within a geode, simply type
:0
or
:1
.
Now try the
where
command to find out what this thread was doing when you stopped the system.
[tutorial:0] 6 => where * 1: near BlockOnLongQueue(), 153dh:c22ah 2: far QueueGetMessage(), 153dh:133ch ------------------------------------------------------------------------------ The event queue for "tutorial:0" is empty ============================================================================== [tutorial:0] 7 =>
These lines tells you that the tutorial thread is idling; it's waiting for a message or something to happen.
Next, use the
gentree
command to examine your application's generic UI object tree.
[tutorial:0] 7 => gentree *TutorialPrimary *TutorialPrimary::GenPrimary (@1, ^l5230h:001eh) "My Tutorial" *TutorialView::GenViewClass (@2, ^l5230h:0020h) ^143b0h:002ah(GenValueClass) (@3, ^15230h:002ah) *TutorialCloseTrigger(GenTriggerClass) (@4, ^15230h:0024h) "Close"
[tutorial:0] 8=>
The
gentree
command prints out a list of all the objects in the tree, along with their class, object references, and monikers. For an example, let's look at the information for the
TutorialView
object:
You can refer to an object by a shortcut that Swat provides, namely, the<EMAIL_ADDRESS>To look at an object's instance data, use the Swat command
pobj
followed by the "@number" designation for the particular object. Try the
pobj
command with the
TutorialView
object.
[tutorial:0] 8 => pobj @2 *TutorialView{GenViewClass} (@5, ^l5230h:0020h) master part: Gen_offset(131) -- ui::GenViewInstance @6: {ui::GenViewInstance (^h21040:502)+131} = { GenInstance GenView_metaInstance = { MetaBase Gen_metaInstance = { ClassStruct _far *MB_class = 3916h:1816h (rudy::CommonUIClassStructu res::OLPaneClass) } LinkPart GI_link = { void _optr LP_next = *TutorialCloseTrigger{GenTriggerClass} (@7, ^l5 230h:0024h) } CompPart GI_comp = { void _optr CP_firstChild = ^l5230h:002ah{GenValueClass} (@8, ^l5230h :002ah) } void _lptr GI_visMoniker = null KeyboardShortcut GI_kbdAccelerator = { KS_PHYSICAL = 0h KS_ALT = 0h KS_CTRL = 0h KS_SHIFT = 0h KS_CHAR_SET = 0h KS_CHAR = C_NULL } GenAttrs GI_attrs = {GA_TARGETABLE} GenStates GI_states = {GS_USABLE, GS_ENABLED} } PointDWFixed GVI_origin = { DWFixed PDF_x = {0.000000} DWFixed PDF_y = {0.000000} } RectDWord GVI_docBounds = { long RD_left = 0 long RD_top = 0 long RD_right = 0 long RD_bottom = 0 } PointDWord GVI_increment = { long PD_x = +20 long PD_y = +15 } PointWWFixed GVI_scaleFactor = { WWFixed PF_x = {1.000000} WWFixed PF_y = {1.000000} } ColorQuad GVI_color = { byte CQ_redOrIndex = fh ColorFlag CQ_info = CF_INDEX byte CQ_green = 0h byte CQ_blue = 0h } GenViewAttrs GVI_attrs = {GVA_NO_WIN_FRAME, GVA_FOCUSABLE} GenViewDimensionAttrs GVI_horizAttrs = {GVDA_DONT_DISPLAY_SCROLLBAR, GVDA_NO_LARGER_THAN_CONTENT} GenViewDimensionAttrs GVI_vertAttrs = {GVDA_NO_LARGER_THAN_CONTENT} GenViewInkType GVI_inkType = GVIT_PRESSES_ARE_NOT_INK void _optr GVI_content = tuto1:0{TutorialProcessClass}(0000h) (@9, ^l56c0h:0 000h) void _optr GVI_horizLink = null void _optr GVI_vertLink = null } Variable Data: *** No Variable Data *** [tutorial:0] 9 =>
We certainly got a lot of data from that command!
*TutorialView{GenViewClass} (@5, ^l5230h:0020h)
The first line gives the object's class, shortcut and pointer information, similar to the output from gentree
.
The rest of the output consists of the object's instance data. For example:
GenViewDimensionAttrs GVI_horizAttrs = { GVDA_DONT_DISPLAY_SCROLLBAR, GVDA_NO_LARGER_THAN_CONTENT}
These lines show which flags (of type GenViewDimensionAttrs
)
are set for the object's
GVI_horizAttrs
instance data field. Notice that Swat displays both the flag set in your source code, GVDA_NO_LARGER_THAN_CONTENT
, as well as the default flag set by the system, GVDA_DONT_DISPLAY_SCROLLBAR
.
You may recognize some of the instance data fields from your source code. Other fields you may not recognize because you didn't specify values for these fields, allowing the system to use default values instead.
With
pobj
, you took advantage of another Swat feature: command completion.
There is no "pobj
"
Swat command; the command's name is really
"pobject
." Because
"pobject
" was the only
Swat command that begins with p-o-b-j, Swat realized what you meant when you used
"pobj
."
Next let's try a series of exploratory Swat commands:
[tutorial:0] 9 => classes TutorialProcessClass (@10, 42b8h:0040h), off ui::UserClassStructures::GenProcessClass [tutorial:0] 10 =>
The
classes
command lists all classes created by the application. To view the class hierarchy for a particular class, use the
cup
("class up") command.
[tutorial:0] 10 => cup @10 dgroup::TutorialProcessClass (@11, 42b8h:0040h) ui::UserClassStructures::GenProcessClass (@12, 30c4h:11e6h) geos::kcode::ProcessClass (@13, 153dh:a9d5h) geos::kcode::MetaClass (@14, 153dh:a8edh) [tutorial:0] 11 =>
As shown above, you can use the shortcut reference (the "@number") with the
cup
command or you can use the class name or reference address,
e.g.,
cup TutorialProcessClass
or
cup 42b8h:0040h
.
Some other Swat commands you might want to try out:
help
command provides documentation on Swat commands. Try
help stop
.
apropos
command allows you to search the Swat documentation by keyword. Try
apropos instance
.
heapspace
command tells you the amount of memory your application requires; you may recall that this value goes in your
.
GP file on the
heapspace
line. Because this value should reflect a worse-case scenario, it's important to run this command several times towards the end of development so that the figure is accurate.
handles
command scans the entire memory heap and returns information about all handles used by the application.In the next chapter, you'll begin by editing the source code, so prepare to switch over to your editor window.
Here is the source code for the application discussed in this chapter. The source code is in two files:
# Permanent name: This is required by Glue to set the permanent name # and extension of the geode. The permanent name of a library is what # goes in the imported library table of a client geode (along with the # protocol number). It is also what Swat uses to name the patient. # name tutorial.app
# Long filename: this name can displayed by the system. "EC " is # prepended to this when the error-checking version is linked by Glue. # longname "Tutorial Sample Application"
# Token: The four-letter name is used by the system to locate the # icon for this application in the token database. The tokenid # number corresponds to the manufacturer ID of the program's author # for uniqueness of the token. Since this is a sample application, we # use the manufacturer ID for the SDK, which is 8. # tokenchars "TUTO" tokenid 8
# Specify geode type: This geode is an application, and will have # its own process (thread). # type appl, process, single
# Specify class name for application thread. Messages sent to the # application thread (a.k.a. "process" when specified as the output # of a UI object) will be handled by this process class. # class TutorialProcessClass
# Specify application object. This is the object that serves as # the top-level UI object in the application. # appobj TutorialApp
# Specify for which platform this application will be compiled. # Glue uses this to make sure that the libraries we are using # (listed below) are available for this platform. # In this case, the specified platform is the Nokia 9000i Communicator # platform n9000v20
# Heapspace: This is roughly the non-discardable memory usage # (in paragraphs (16 bytes/paragraph)) of the application and any # transient libraries that it depends on, plus an additional # amount for thread activity. To find the heapspace for an # application, use the Swat "heapspace" command. # heapspace 3K
# Libraries: list which libraries are used by the application. # The foam library is for the Nokia 9000i Communicator only. # library geos library ui library foam
# Resources: list all resource blocks which are used by the # application whose allocation flags can't be inferred by Glue. # Usually this is needed only for object blocks, fixed code # resources, or data resources that are read-only. Standard # discardable code resources do not need to be mentioned. # resource APPRESOURCE ui-object resource INTERFACE ui-object
/******************************************************************** * Include Files *******************************************************************/ @include <stdapp.goh> @include <foam.goh>
/******************************************************************** * Class Definitions *******************************************************************/ /* * Here we define "TutorialProcessClass" as a subclass of the * system provided "GenProcessClass". As this application is * launched, an instance of this class will be created, and * will handle all application-related events (messages). The * application thread will be responsible for running this * object, meaning that whenever this object handles a message, * we will be executing in the application thread. * * You will find no object in this file declared to be of this * class. Instead, it is specified as the class for the * application thread in "tutorial.gp". */ @class TutorialProcessClass, GenProcessClass;
/* * Define messages for this class here. Most commonly, UI * objects will send these messages to the application thread * when they've been activated by the user. */ @endc; /* end of class definition */
/******************************************************************** * Class Declarations *******************************************************************/ /* * Each object class requires a "class record" be stored in * fixed memory for it. The class record is used by the GEOS * message system for the delivery of messages sent to an * object of the class. The class record needs to be defined * in the file where the objects of that class are defined. * The @classdecl GOC directive tells GOC to create the class * record here. * * The neverSaved flag is necessary because ProcessClass * objects are hybrid objects. It tells the system that no * object of this class will ever be loaded from or stored to * a state file. */ @classdecl TutorialProcessClass, neverSaved;
/******************************************************************** * UI Object Resources *******************************************************************/
/******************************************************************** * AppResource Resource *******************************************************************/ @start AppResource;
/* * Application Object * * The very top-level generic object of an application MUST be * a GenApplication object. The tutorial.gp file contains the "appobj" * statement which indicates that this "TutorialApp" object is in * fact the top-level UI object. * * This object should be in its own resource, as it is all that * need be in memory when the application is iconified. As such, * its resource should be as small as possible. * * FoamSubApplicationClass is for the Nokia 9000i Communicator * only. It adds special behavior for that platform. */ @object FoamSubApplicationClass TutorialApp = { /* * While the application object isn't shown on the screen, * it has a list of VisMonikers for three purposes: * 1) The GenPrimary (see below) inherits the moniker * when it comes up on screen. * 2) When GeoManager needs to display an icon for the * application, and there's none for it in the Token * Database, it launches the app and sends a message * to the application object to install its list of * monikers in the token database under the * application's token. * 3) When the GenPrimary is minimized, it uses the most * appropriate graphical moniker from this list for the * application's icon. If there's an abbreviated-text * moniker in the list, that's used as the icon title. * Else any regular-text moniker is used. */ GI_visMoniker = list { @TutorialTextMoniker };
/* * The GenApplication object has at least one child: * the main application window. */ GI_comp = @TutorialPrimary;
/* * The main window should appear on-screen when the application * is launched, so place it on the GAGCNLT_WINDOWS GCN list. * This causes the application object to bring it on-screen at * the appropriate time. */ gcnList( MANUFACTURER_ID_GEOWORKS, GAGCNLT_WINDOWS ) = @TutorialPrimary; }
@visMoniker TutorialTextMoniker = "My Tutorial"; @localize "Program Title";
@end AppResource;
/******************************************************************** * Interface Resource * This resource is for miscellaneous UI objects. *******************************************************************/ @start Interface;
/* * Primary window * * Every application has at least one GenPrimary object. * This object serves as the main window of the application. * Inside this window, various UI components, such as menus * or lists, can be placed. */ @object GenPrimaryClass TutorialPrimary = { /* * This window has two children: * the GenView object and the Close button (see below). */ GI_comp = @TutorialView, @TutorialCloseTrigger; }
/* * GenView object * * This GenView object creates a window where the application can * display portions of the document as necessary. As we want this * window to be scrollable, the specific UI will create scroll * bars with which the user can interact. Whenever a portion of * the window needs to be redrawn, the GenView object will * invalidate a portion of the window, causing a MSG_META_EXPOSED * to be sent to the application. The application will draw the * document into the window as requested. The window keeps track * of a mask, which is used to clip the application's drawing * operations, so that only the invalid portion of the window is * drawn to. */ @object GenViewClass TutorialView = { /* * Make sure the view never gets larger * than the thing being displayed within it. */ GVI_horizAttrs = @default | GVDA_NO_LARGER_THAN_CONTENT; GVI_vertAttrs = @default | GVDA_NO_LARGER_THAN_CONTENT; /* * When the contents of this view (i.e. the document) must be * updated, the UI should send a MSG_META_EXPOSED to the * TutorialProcessClass object. */ GVI_content = process; };
/* * Close trigger * * On certain systems we should provide a way to exit the * application. On the Nokia 9000i Communicator we have a * close trigger like this one. */ @object GenTriggerClass TutorialCloseTrigger = { GI_visMoniker = "Close"; /* * The next two instance fields are part of the * GenTriggerClass. They specify the recipient object * and the message that will be sent to that object * when this trigger is activated. */ GTI_destination = @TutorialApp; GTI_actionMsg = MSG_FSA_RETURN_TO_LAUNCHER; /* * The specific UI uses this combination of hints * to place this trigger on the right side of the * Nokia 9000i Communicator's screen. */ HINT_SEEK_MENU_BAR; HINT_SEEK_REPLY_BAR; HINT_SEEK_SLOT = 3; }
@end Interface;
Here is the source code for the application discussed in this chapter. Pieces of the code which have been added or changed from that in the previous chapter are called out in bold.
# Permanent name: This is required by Glue to set the permanent name # and extension of the geode. The permanent name of a library is what # goes in the imported library table of a client geode (along with the # protocol number). It is also what Swat uses to name the patient. # name tutorial.app
# Long filename: this name can displayed by the system. "EC " is # prepended to this when the error-checking version is linked by Glue. # longname "Tutorial Sample Application"
# Token: The four-letter name is used by the system to locate the # icon for this application in the token database. The tokenid # number corresponds to the manufacturer ID of the program's author # for uniqueness of the token. Since this is a sample application, we # use the manufacturer ID for the SDK, which is 8. # tokenchars "TUTO" tokenid 8
# Specify geode type: This geode is an application, and will have # its own process (thread). # type appl, process, single
# Specify class name for application thread. Messages sent to the # application thread (a.k.a. "process" when specified as the output # of a UI object) will be handled by this process class. # class TutorialProcessClass
# Specify application object. This is the object that serves as # the top-level UI object in the application. # appobj TutorialApp
# Specify for which platform this application will be compiled. # Glue uses this to make sure that the libraries we are using # (listed below) are available for this platform. # In this case, the specified platform is the Nokia 9000i Communicator # platform n9000v20
# Heapspace: This is roughly the non-discardable memory usage # (in paragraphs (16 bytes/paragraph)) of the application and any # transient libraries that it depends on, plus an additional # amount for thread activity. To find the heapspace for an # application, use the Swat "heapspace" command. # heapspace 3K
# Libraries: list which libraries are used by the application. # The foam library is for the Nokia 9000i Communicator only. # library geos library ui library foam
# Resources: list all resource blocks which are used by the # application whose allocation flags can't be inferred by Glue. # Usually this is needed only for object blocks, fixed code # resources, or data resources that are read-only. Standard # discardable code resources do not need to be mentioned. # resource APPRESOURCE ui-object resource INTERFACE ui-object
# # Any classes that we define in our application must be exported # here for glue to process them. # export TutorialViewClass
/******************************************************************** * Include Files *******************************************************************/ @include <stdapp.goh> @include <foam.goh>
/******************************************************************** * Constants *******************************************************************/ /* * These constants are used in the TutorialDraw function. */ #define TEXT_POINT_SIZE 48.0 /* point size */ #define TEXT_ROTATION -15 /* angle of rotation (degrees) */ #define TEXT_X_POSITION 30 /* x position, in document coords */ #define TEXT_Y_POSITION 0 /* y position, in document coords */
/******************************************************************** * Class Definitions *******************************************************************/ /* * Here we define "TutorialProcessClass" as a subclass of the * system provided "GenProcessClass". As this application is * launched, an instance of this class will be created, and * will handle all application-related events (messages). The * application thread will be responsible for running this * object, meaning that whenever this object handles a message, * we will be executing in the application thread. * * You will find no object in this file declared to be of this * class. Instead, it is specified as the class for the * application thread in "tutorial.gp". */ @class TutorialProcessClass, GenProcessClass; /* * Define messages for this class here. Most commonly, UI * objects will send these messages to the application thread * when they've been activated by the user. */ @endc; /* end of class definition */ /* * We subclass GenViewClass here because we need to * intercept a message for our GenView object. */ @class TutorialViewClass, GenViewClass; @endc; /* end of class definition */
/******************************************************************** * Class Declarations *******************************************************************/ /* * Each object class requires a "class record" be stored in * fixed memory for it. The class record is used by the GEOS * message system for the delivery of messages sent to an * object of the class. The class record needs to be defined * in the file where the objects of that class are defined. * The @classdecl GOC directive tells GOC to create the class * record here. * * The neverSaved flag is necessary because ProcessClass * objects are hybrid objects. It tells the system that no * object of this class will ever be loaded from or stored to * a state file. */ @classdecl TutorialProcessClass, neverSaved; @classdecl TutorialViewClass;
/******************************************************************** * UI Object Resources *******************************************************************/ /******************************************************************** * AppResource Resource *******************************************************************/ @start AppResource; /* * Application Object * * The very top-level generic object of an application MUST be * a GenApplication object. The tutorial.gp file contains the "appobj" * statement which indicates that this "TutorialApp" object is in * fact the top-level UI object. * * This object should be in its own resource, as it is all that * need be in memory when the application is iconified. As such, * its resource should be as small as possible. * * FoamSubApplicationClass is for the Nokia 9000i Communicator * only. It adds special behavior for that platform. */ @object FoamSubApplicationClass TutorialApp = { /* * While the application object isn't shown on the screen, * it has a list of VisMonikers for three purposes: * 1) The GenPrimary (see below) inherits the moniker * when it comes up on screen. * 2) When GeoManager needs to display an icon for the * application, and there's none for it in the Token * Database, it launches the app and sends a message * to the application object to install its list of * monikers in the token database under the * application's token. * 3) When the GenPrimary is minimized, it uses the most * appropriate graphical moniker from this list for the * application's icon. If there's an abbreviated-text * moniker in the list, that's used as the icon title. * Else any regular-text moniker is used. */ GI_visMoniker = list { @TutorialTextMoniker }; /* * The GenApplication object has at least one child: * the main application window. */ GI_comp = @TutorialPrimary; /* * The main window should appear on-screen when the application * is launched, so place it on the GAGCNLT_WINDOWS GCN list. * This causes the application object to bring it on-screen at * the appropriate time. */ gcnList( MANUFACTURER_ID_GEOWORKS, GAGCNLT_WINDOWS ) = @TutorialPrimary; } @visMoniker TutorialTextMoniker = "C Tutorial"; @localize "Program Title"; @end AppResource;
/******************************************************************** * Interface Resource * This resource is for miscellaneous UI objects. *******************************************************************/ @start Interface; /* * Primary window * * Every application has at least one GenPrimary object. * This object serves as the main window of the application. * Inside this window, various UI components, such as menus * or lists, can be placed. */ @object GenPrimaryClass TutorialPrimary = { /* * This window has two children: * the GenView object and the Close button (see below). */ GI_comp = @TutorialView, @TutorialCloseTrigger; } /* * GenView object * * This GenView object creates a window where the application can * display portions of the document as necessary. As we want this * window to be scrollable, the specific UI will create scroll * bars with which the user can interact. Whenever a portion of * the window needs to be redrawn, the GenView object will * invalidate a portion of the window, causing a MSG_META_EXPOSED * to be sent to the application. The application will draw the * document into the window as requested. The window keeps track * of a mask, which is used to clip the application's drawing * operations, so that only the invalid portion of the window is * drawn to. */ @object TutorialViewClass TutorialView = { /* * Make view scrollable in X and Y and ensure that it never * gets larger than the thing being displayed within it. */ GVI_horizAttrs = @default | GVDA_SCROLLABLE | GVDA_NO_LARGER_THAN_CONTENT; GVI_vertAttrs = @default | GVDA_SCROLLABLE | GVDA_NO_LARGER_THAN_CONTENT; /* * When the contents of this view (i.e. the document) must be * updated, the UI should send a MSG_META_EXPOSED to the * TutorialProcessClass object. */ GVI_content = process; /* * Specify the dimensions of the document being displayed * within the view. */ GVI_docBounds = { 0, 0, 1000, 1000 }; }
/* * Close trigger * * On certain systems we should provide a way to exit the * application. On the Nokia 9000i Communicator we have a * close trigger like this one. */ @object GenTriggerClass TutorialCloseTrigger = { GI_visMoniker = "Close"; /* * The next two instance fields are part of the * GenTriggerClass. They specify the recipient object * and the message that will be sent to that object * when this trigger is activated. */ GTI_destination = @TutorialApp; GTI_actionMsg = MSG_FSA_RETURN_TO_LAUNCHER; /* * The specific UI uses this combination of hints * to place this trigger on the right side of the * Nokia 9000i Communicator's screen. */ HINT_SEEK_MENU_BAR; HINT_SEEK_REPLY_BAR; HINT_SEEK_SLOT = 3; }
@end Interface;
/******************************************************************** * Function Definitions *******************************************************************/ /******************************************************************** * TutorialDraw ******************************************************************** * SYNOPSIS: Redraws the entire document, given a graphics state * through which to draw. * CALLED BY: (INTERNAL) TutorialProcess::MSG_META_EXPOSED * RETURNS: void * SIDE EFFECTS: Various aspects of the gstate are altered. * STRATEGY: First set the font used by this gstate. Then * set the text color. Using the constant angle lets * rotate the gstate. To finish up, draw the text * text to the gstate. *******************************************************************/ void TutorialDraw( GStateHandle gstate ) /* * gstate - GState to draw to. */ { /* * First change some of the default GState values, * such as font and point size. */ GrSetFont( gstate, FID_DTC_URW_SANS, MakeWWFixed( TEXT_POINT_SIZE ) ); /* * Apply a rotation to the transformation matrix, * so the text will be drawn at an angle. */ GrApplyRotation( gstate, MakeWWFixed( TEXT_ROTATION ) ); /* * Draw some text onto the document. */ GrDrawText( gstate, TEXT_X_POSITION, TEXT_Y_POSITION, "The quick brown fox jumps over the lazy dog.", 0 ); } /* TutorialDraw */
/******************************************************************** * Code for TutorialProcessClass *******************************************************************/ /******************************************************************** * MSG_META_EXPOSED ******************************************************************** * SYNOPSIS: Redraw the recently-exposed portion of the View. * See the Objects Reference book for more information * on this message and its parameters. * PARAMETERS: WindowHandle win * RETURNS: void * SIDE EFFECTS: The invalid region of the window is cleared out. * STRATEGY: This message is sent by the windowing system when a * portion of the GenView has become invalid, either * because a window that was obscuring it has been moved, * or because someone called GrInvalRect. We redraw the * entire document, after telling the graphics system * we're drawing to the invalid portion of the window. * *******************************************************************/ @method TutorialProcessClass, MSG_META_EXPOSED { /* * gstate - This is a handle to the graphics state * that we'll use to draw to the view. */ GStateHandle gstate; /* * Get a default graphics state that we can use while drawing. */ gstate = GrCreateState( win ); /* * Start a window update. This tells the windowing system * that we are in the process of drawing to the invalid portion * of this window. GrBeginUpdate/GrEndUpdate are necessary only * when handling MSG_META_EXPOSED. For drawing at other times, * all you need do is create a graphics state and draw through it. */ GrBeginUpdate( gstate ); /* * Draw the pattern into the window (pass the GState). Breaking * the exposure and general drawing into two routines allows the * display to be updated by other routines without having to * invalidate the window. */ TutorialDraw( gstate ); /* * Now indicate that we are done drawing to the invalid area * and free the gstate. */ GrEndUpdate( gstate ); GrDestroyState( gstate ); } /* MSG_META_EXPOSED */ /* This is here to work around a bug in the Borland C 5.0 compiler. */ @method TutorialProcessClass, MSG_GEN_PROCESS_CLOSE_APPLICATION { return( @callsuper() ); }
/******************************************************************** * Code for TutorialViewClass *******************************************************************/ /******************************************************************** * MSG_META_KBD_CHAR ******************************************************************** * SYNOPSIS: We intercept this message to add the scrolling * behavior to the GenView. Normally this would work * in GEOS but the Nokia 9000i Communicator has the * scrolling disabled in GenViewClass. * PARAMETERS: word character * word flags * word state * RETURNS: void * SIDE EFFECTS: none * STRATEGY: We first check the parameters to see if this * keypress is one we are interested in. It has to be * a "control" key, and must not be a key release * (i.e. the user released the key after holding it). * If both of these conditions are true we can then * use a switch statement to see which key is being * pressed and send the appropriate message to the * GenView object. *******************************************************************/ @method TutorialViewClass, MSG_META_KBD_CHAR { /* * theChar - A copy of the character with only the * low byte. The high byte of character * has some extra flags we don't need here. */ byte theChar; /* * Arrow keys and scroll buttons are control characters. * We handle first press and repeat presses of those keys. */ if ( ( ( character >> 8 ) == CS_CONTROL ) && ( flags & ( CF_FIRST_PRESS | CF_REPEAT_PRESS ) ) ) { theChar = character & 0xFF; switch ( theChar ) { case VC_PREVIOUS: /* This handles the Page Up key. */ @send self::MSG_GEN_VIEW_SCROLL_PAGE_UP(); break; case VC_UP: /* This handles the up arrow key. */ @send self::MSG_GEN_VIEW_SCROLL_UP(); break; case VC_NEXT: /* This handles the down arrow key. */ @send self::MSG_GEN_VIEW_SCROLL_PAGE_DOWN(); break; case VC_DOWN: /* This handles the up arrow key. */ @send self::MSG_GEN_VIEW_SCROLL_DOWN(); break; case VC_RIGHT: /* This handles the right arrow key. */ @send self::MSG_GEN_VIEW_SCROLL_RIGHT(); break; case VC_LEFT: /* This handles the left arrow key. */ @send self::MSG_GEN_VIEW_SCROLL_LEFT(); break; default: /* * Pass on other control chars to default handler. */ @callsuper(); } /* switch */ } else { /* * Pass on all other chars to default handler. */ @callsuper(); } } /* MSG_META_KBD_CHAR */


Gold prices fall by Rs 53 to Rs 39,007 on marginal appreciation in rupee
Globally, gold prices traded firm on Thursday amid the US-China political spat and trade uncertainities
by Press Trust of IndiaGold prices on Thursday declined by Rs 53 to Rs 39,007 per 10 gram in the national capital on marginal appreciation in rupee, as per HDFC Securities.
In the previous trade, the precious metal had closed at Rs 39,060 per 10 gram.
Silver prices also witnessed a marginal correction of Rs 20 to Rs 45,830 per kg as compared to Rs 45,850 per kg on Wednesday.
"Spot gold prices for 24 Karat in Delhi were trading down by Rs 53 on marginal rupee appreciation. The wedding demand is set to cheer spot gold markets in India," HDFC Securities Senior Analyst (Commodities) Tapan Patel said.
In the international market, gold was trading marginally higher at $1,472.70 an ounce, while silver quoted slightly lower at $ 17.10 per ounce.
Globally, gold prices traded firm on Thursday amid the US-China political spat and trade deal uncertainties, he added.


Police probe attempted ATM theft in Ballynahinch
A petrol station's forecourt roof has been torn down in an attempted ATM robbery.
Extensive damage was caused during the raid in Ballynahinch, Co Down, in the early hours of Monday.
It is suspected the thieves used a digger in a bid to rip the cash machine from the wall of Carlisles filling station and convenience store in Belfast Road.
The road was closed on Monday morning, causing major disruption to rush-hour traffic.
The attack is the latest in a series of ATM raids in Northern Ireland this year.
The latest ATM theft attempt follows a similar incident at the weekend when thieves tried to rip a cash machine from Belfast City Hospital before ramming the shutters of a string of businesses in the city and Lisburn.
Industry organisation Retail NI condemned the latest attacks.
Chief executive Glyn Roberts said: "Words fail to describe my anger at this disgraceful attempted ATM robbery on one of our members.
"This has caused extensive damage to one of Ballynahinch's largest retailers in the run-up to Christmas.
"This is an independent retailer, who provides an invaluable service to the local community, awakened from his sleep to be told his business is smashed up.
"It is also a new low for these robbers to attack health centres to steal ATMs.
"We would urge all businesses and organisations who have external ATMs to be vigilant and urge members of the public with any information to contact the PSNI."


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.uima.mediawiki.cr.factory.MWDumpReaderFactory
public class MWDumpReaderFactory
This class is the factory for the parser. It's designed mainly to handle smoothly the process of adding filters to the XML stream before it's actually processed by the parser. It also serves as the entry point to open the file we will be reading from.
The filters are almost all at the XML stream level. There is of course an exception : the "latest only" filter that allows you to keep only the latest revision in an article, is at the parser level. That is because at the XML stream level, we only see one revision at a time, and so we don't have two of them to compare. All the filters will be detailed further in this documentation.
MWDumpReader
| Nested Class Summary | |
|---|---|
class |
MWDumpReaderFactory.AfterTimestampFilter
This class provides revisions filtering depending on their timestamp to the parser. |
class |
MWDumpReaderFactory.BeforeTimestampFilter
This class provides revisions filtering depending on their timestamp to the parser. |
class |
MWDumpReaderFactory.MWDumpReaderLatestOnly
This filter allows to keep only the latest revision for each page. |
class |
MWDumpReaderFactory.NamespaceFilter
This class provides namespace filtering against a list to the parser. |
class |
MWDumpReaderFactory.TitleListFilter
This class provides title matching against a list to the parser. |
class |
MWDumpReaderFactory.TitleRegexFilter
This class provides titles filtering with regular expressions to the parser. |
| Constructor Summary | |
|---|---|
MWDumpReaderFactory(java.io.File theXMLDump)
Initialize the factory with the provided XML input stream. |
| Method Summary | |
|---|---|
void |
addAfterTimestampFilter(java.lang.String cfgAfterTimestamp)
This method works exactly the same way as the addBeforeTimestampFilter(String) method, except
for the fact that here only the revisions contributed after the given timestamp are considered valid. |
void |
addBeforeTimestampFilter(java.lang.String cfgBeforeTimestamp)
This allows you to filter out all the revisions that were not contributed before the given timestamp. |
void |
addExcludeTalkFilter(org.apache.uima.mediawiki.cr.types.MWSiteinfo theSiteInfo)
This method is just a shortcut for the namespace filter, allowing you to filter out all the talk pages easily. |
void |
addLatestOnlyFilter()
This just tells the factory to instantiate a parser that will strip off all the revisions but the latest in it's results, instead of a regular parser. |
void |
addNamespaceFilter(org.apache.uima.mediawiki.cr.types.MWSiteinfo theSiteInfo,
java.lang.String cfgNamespaces)
This method allows you to setup a filter on the namespaces you want to consider. |
void |
addRevisionFilter(java.lang.String cfgRevisionList)
This method provides filtering on the revision's id. |
void |
addTitleListFilter(java.lang.String cfgList,
boolean exact)
This method allows you to set up a title filter easily. |
void |
addTitleRegexFilter(java.lang.String regex)
Filters out all the pages which titles do not match the provided regular expression. |
void |
clearFilters()
Clears all the filters that may have been applied to the XML stream. |
void |
close()
This method attemps to cleanly free the ressources used by the factory. |
MWDumpReader |
getParser()
Returns the current parser as crafted by the factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MWDumpReaderFactory(java.io.File theXMLDump) throws javax.xml.parsers.FactoryConfigurationError
getParser()
theXMLDump
- the XML stream to read from.
javax.xml.parsers.FactoryConfigurationError
- if something goes wrong.| Method Detail |
|---|
public MWDumpReader getParser() throws MWDumpReader.MWParseException, MWDumpReader.MWParseException
Returns the current parser as crafted by the factory. It includes the filter(s) that you may have
specified. You may as well get the default one after calling clearFilters()
Even though you could in theory get several parsers from the same factory, this is not a good idea. They would all be reading from the same XML stream, and they are not designed for concurrent use. This would most likely result in each parser reporting the malformedness of the XML stream.
During the initialisation of the parser, it skips some unuseful heading elements. If the input stream is malformed it will raise a parse exception.
MWDumpReader.MWParseException
- If the parser encounters a malformation in the underlying XML document.
uima.wikipedia.parser.MWDumpReader.MWParseException
public void clearFilters() throws javax.xml.stream.XMLStreamException, java.io.IOException
javax.xml.stream.XMLStreamException
- If the parser encounters a malformation in the underlying XML document.
java.io.IOException
- If the factory fails to open the dump file again.public void close()
public void addTitleListFilter(java.lang.String cfgList, boolean exact) throws java.io.IOException, javax.xml.stream.XMLStreamException
The exact flag allows you to specify if the match should be exact or not. An exact match means that only the pages with the specified title and which are in the default namespace, will get through.
cfgList
- The file we are reading from (containing the list of titles)exact
- A flag indicating if the match should be exact or not
java.io.IOException
- If we fail to open the file containing the title list
javax.xml.stream.XMLStreamException
- If we fail to create the new filtered XML stream reader.public void addTitleRegexFilter(java.lang.String regex) throws javax.xml.stream.XMLStreamException
Filters out all the pages which titles do not match the provided regular expression. The match takes place only on the actual title, we don't consider the eventual namespace prefix.
Example : "^Foo bar.*" will allow all the pages with a title starting with "Foo bar"
regex
- The regular expression you want the titles to match
javax.xml.stream.XMLStreamException
- If we fail to create the new filtered XML stream reader.public void addNamespaceFilter(org.apache.uima.mediawiki.cr.types.MWSiteinfo theSiteInfo, java.lang.String cfgNamespaces) throws javax.xml.stream.XMLStreamException
The default behaviour of this filter is to include only the specified namespace in the results. If you want to exclude namespaces, you can prefix the key list by a '!' (Ex : "! 1, 2, 5, 101")
theSiteInfo
- The website info gathered by the parser.cfgNamespaces
- The list of namespaces to filter.
javax.xml.stream.XMLStreamException
- If we fail to create the new filtered XML stream reader.public void addExcludeTalkFilter(org.apache.uima.mediawiki.cr.types.MWSiteinfo theSiteInfo) throws javax.xml.stream.XMLStreamException
theSiteInfo
- The website info gathered by the parser.
javax.xml.stream.XMLStreamException
- If we fail to create the new filtered XML stream reader.public void addRevisionFilter(java.lang.String cfgRevisionList) throws java.io.IOException, javax.xml.stream.XMLStreamException
addTitleListFilter(String, boolean)
method described earlier. The ids you want to keep should
appear only one by line in the provided file. You can comment a line with a '#'.
cfgRevisionList
- The file we are reading from (containing the list of ids)
java.io.IOException
- If we fail to open the file containing the ids
javax.xml.stream.XMLStreamException
- If we fail to create the new filtered XML stream reader.public void addLatestOnlyFilter()
public void addBeforeTimestampFilter(java.lang.String cfgBeforeTimestamp) throws java.text.ParseException, javax.xml.stream.XMLStreamException
Be aware that this filter internally uses a Calendar
object that is lenient. That means that if
you try to specify the month 20, it will try to work arround it and probably consider it like December
+ 8 month.
cfgBeforeTimestamp
- The timestamp to check for.
java.text.ParseException
- If the provided timestamp doesn't follow the format specification.
javax.xml.stream.XMLStreamException
- If we fail to create the new filtered XML stream reader.public void addAfterTimestampFilter(java.lang.String cfgAfterTimestamp) throws java.text.ParseException, javax.xml.stream.XMLStreamException
addBeforeTimestampFilter(String)
method, except
for the fact that here only the revisions contributed after the given timestamp are considered valid.
cfgAfterTimestamp
- The timestamp to check for.
java.text.ParseException
- If the provided timestamp doesn't follow the format specification.
javax.xml.stream.XMLStreamException
- If we fail to create the new filtered XML stream reader.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


{% extends "layout_maps.html" %} {% block title %}
{{ map.description }}
Currently, nobody has published a topic map. Patience, my friend, patience!


Mayor denies campaigning at polls on Airbnb question
JERSEY CITY, N.J. (AP) - Jersey City’s mayor is denying he engaged in prohibited campaigning during voting on hotly contested measures restricting Airbnb and other short-term rental companies.
A short video posted online Tuesday showed Mayor Steven Fulop speaking to someone inside a polling place near a voting booth. The conversation wasn’t entirely intelligible, but Fulop can be heard saying, ‘So vote ‘yes.’”
At a news conference Wednesday, Fulop said he was thanking poll workers and that he didn’t approach anyone or hand out literature.
State law bans soliciting support or distributing literature within 100 feet of a polling place.
A spokesman for Keep Our Homes, an organization opposed to the measures, said in an email that Fulop’s actions showed “a shocking disregard for the law.”
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.