find out which rule is blocking

Is there a way to find out which rule blocks an action?

I am trying get access to examine a thing contained in a kind of thing (though it is not exactly a container - just openable, see below).
The examine current photo and examine model won’t work:

[code]
open magazine
read page 2 of magazine

examine current photo
examine model
examine slippers[/code]


[photography.i7x]

An object can be pictured or real.

A photo is a kind of container. A photo can be fixed in place or portable. The carrying capacity of a photo is 0.
Understand "picture" or "photo" as a photo.

Instead of doing something other than examining or looking under with a pictured object: say "[The noun] [are] just displayed in the picture.".

[possibly a rule here would be better]
Before inserting something into a photo:
	say "Impossible!";
	stop the action;
	
[end - photography.i7x]
[Paged Text Book.i7x]

A book is a kind of thing. A book has a table-name called the book pages. A book can be open or closed. A book can be openable. A book is openable and closed.

Understand "read [something]" or "consult [something]" or "read in/from [something]" as reading. Reading is an action applying to one thing, requiring light.

Understand "read [number] in/from/of [something]" or "read page [number] in/from/of [something]" or "look up page [number] in/from/of [something]" or "consult page [number] in/from/of [something]" as reading it in. Reading it in is an action applying to one number and one thing, requiring light.

This is the book requirement rule:
	Let B be the noun;
	If B is not a book:
		now B is the second noun;
		If B is not a book:
			say "That is not a book";
			rule fails;
	if the player is not carrying B:
		try silently taking B;
		if the player is not carrying B, say "You don't have it." instead;
	if B is closed:
		say "You open [the B]. [run paragraph on]";
		Now B is open.

Does the player mean reading something in the book: it is very likely.
Does the player mean opening something in the book: it is very likely.

To read page (N - a number) of (B - a book):
	Abide by the book requirement rule;
	Let L be the number of rows in the book pages of B;
	If N is greater than L or N is less than 1:
		say "[The B] only has pages 1 to [L].";
	Else:
		say "On page [N] you read:[paragraph break][italic type]'[row N in the book pages of B]'[roman type]".

Check reading it in:
	Abide by the book requirement rule;
	let L be the number of rows in the book pages of the second noun;
	if the number understood is greater than L, say "[The second noun] has only [L] pages." instead;
	if the number understood is less than 1, say "The first is page 1." instead.

Carry out reading it in: read page number understood of the second noun.

Check reading:	Abide by the book requirement rule;
Carry out reading a book(called B): try silently reading 1 in B.
Instead of opening a book(called B): try silently reading 1 in B.

[functions, mostly similar to documented `Example Pages' were excluded since not entirely relevant to my question]

[end - Paged Text Book.i7x]
[clothing tables.i7x]

Some garment is a kind of thing. A garment is always wearable.
Some paired garments is a kind of garment. It is usually ambiguously plural. The indefinite article is usually "some". The plural of some paired garments is pairs of paired garments.

Some boots, gloves, glasses, socks and trousers is a kind of paired garments.

Table of Catalogued Socks
socks (socks)	short description	description
sturdy socks	"grey sturdy socks"	"Foot protection"

Some socks are defined by the Table of Catalogued Socks

Table of Catalogued Glasses
glasses (glasses)	short description	description
safety glasses	"Safety Glasses"	"Fortified shatterproof glasses for dangerous jobs."
snorkel mask	"Snorkel Mask"	"This special mask makes swimming a bit easier and increases the time you can spend underwater."

Some glasses are defined by the Table of Catalogued Glasses

Table of Catalogued Trousers
trousers (trousers)	short description	description
simple pants	"simple pants"	"Leg coverings"
green shorts	"green shorts"	"Short leg coverings"

Some trousers are defined by the Table of Catalogued Trousers

Table of Catalogued Boots
boots (boots)	short description	description
female-work-boots	"Female Work Boots"	"A pair of low-heeled boots. Comfortable and dirt-repellent."
slippers	"Slippers"	"It[apostrophe]s dangerous to walk in urban areas without shoes, you could easily get hurt."

Some boots are defined by the Table of Catalogued Boots
[end clothing tables.i7x]

Table of Cataloged Gloves
gloves (gloves)	short description	description
leather gloves	"Leather Gloves"	"Gloves of thin leather to protect hands from calluses."

Some gloves are defined by the Table of Cataloged Gloves

Table of book Wear
worn socks (socks)	worn glasses (glasses)	worn trousers (trousers)	worn boots (boots)	worn gloves (gloves)
sturdy socks	safety glasses	simple pants	female-work-boots	leather gloves
--	snorkel mask	green shorts	slippers	--

The magazine is a kind of book.

The current photo is a scenery photo in a magazine.
The book pages of a magazine is Table of book Wear.

The photo model is a pictured woman in the current photo.
Understand "model", "displayed woman" or "woman" as the photo model.

The main room is a room.

To change (M - a model) in (L - a list of things):
	let garbs be the list of things worn by M;
	repeat with cloth running through garbs:
		now the cloth is nowhere;
	Repeat with cloth running through L:
		If M is not wearing cloth:
			Now M is wearing cloth;

To read page (N - a number) of (M - a magazine):
	Abide by the book requirement rule;
	Let L be the number of rows in the book pages of M;
	If N is greater than L or N is less than 1:
		say "The magazine only has pictures on pages 1 to [L].";
	Else:
		let garbs be a list of garments;
		choose row N in the book pages of M;
		[FIXME: is there a better way to do this?]
		If there is a worn socks entry, add worn socks entry to garbs;
		If there is a worn glasses entry, add worn glasses entry to garbs;
		If there is a worn trousers entry, add worn trousers entry to garbs;
		If there is a worn boots entry, add worn boots entry to garbs;
		If there is a worn gloves entry, add worn gloves entry to garbs;
		[..]
		change photo model in the garbs;
		say "[one of][A photo model] is [one of]shown[or]displayed[or]visible[at random] in [one of]the centre[or]this image[at random][or]The [one of]image[or]picture[or]page[at random] [one of]shows[or]displays[at random] [a photo model][at random]. [The photo model] is wearing [garbs].";

The fashion magazine is a magazine in the main room.

I can make this work by making the book a container, and placing the current photo in the fashion magazine, but then when I type take inventory, I get a whole thread of contents, and I’d rather just see the the magazine listed only.

Replace the book definition by:

A book is a kind of container. A book has a table-name called the book pages.

And the section below the table of Wear by:

[code]The main room is a room.
The magazine is a book in the main room. Understand “fashion magazine” as the magazine.

The current photo is a scenery photo in the magazine.
The book pages of the magazine is Table of book Wear.

The photo model is a pictured woman in the current photo.
Understand “model”, “displayed woman” or “woman” as the photo model.

To change (M - a model) in (L - a list of things):
let garbs be the list of things worn by M;
repeat with cloth running through garbs:
now the cloth is nowhere;
Repeat with cloth running through L:
If M is not wearing cloth:
Now M is wearing cloth;

To read page (N - a number) of (M - a magazine):
Abide by the book requirement rule;
Let L be the number of rows in the book pages of M;
If N is greater than L or N is less than 1:
say “The magazine only has pictures on pages 1 to [L].”;
Else:
let garbs be a list of garments;
choose row N in the book pages of M;
[FIXME: is there a better way to do this?]
If there is a worn socks entry, add worn socks entry to garbs;
If there is a worn glasses entry, add worn glasses entry to garbs;
If there is a worn trousers entry, add worn trousers entry to garbs;
If there is a worn boots entry, add worn boots entry to garbs;
If there is a worn gloves entry, add worn gloves entry to garbs;
[…]
change photo model in the garbs;
say “[one of][A photo model] is [one of]shown[or]displayed[or]visible[at random] in [one of]the centre[or]this image[at random][or]The [one of]image[or]picture[or]page[at random] [one of]shows[or]displays[at random] [a photo model][at random]. [The photo model] is wearing [garbs].”;[/code]

… but then it is shown as a container, which is not exactly right either. Also this may become a problem if we later want to build upon this to create something that’s not exactly a magazine. The inheritance would be more feasible if we can define a magazine as a kind.

Start your project, type “rules,” and then try the action. It will list every rule that is running.

(In this specific case, I can’t tell what’s going wrong–which action is doing something you don’t want it to do?)

thank you for the suggestion that is perfect.

In case someone is interested, got the code to work by defining the current page as a part of the fashion magazine. So in original non-container book version, replace the last section by:

[code]The magazine is a kind of book. The book pages of a magazine is Table of book Wear.

To read page (N - a number) of (M - a magazine):
Abide by the book requirement rule;
Let L be the number of rows in the book pages of M;
If N is greater than L or N is less than 1:
say “The magazine only has pictures on pages 1 to [L].”;
Else:
let garbs be a list of garments;
choose row N in the book pages of M;
[FIXME: is there a better way to do this?]
If there is a worn socks entry, add worn socks entry to garbs;
If there is a worn glasses entry, add worn glasses entry to garbs;
If there is a worn trousers entry, add worn trousers entry to garbs;
If there is a worn boots entry, add worn boots entry to garbs;
If there is a worn gloves entry, add worn gloves entry to garbs;
[…]
change photo model in the garbs;
say “[one of][A photo model] is [one of]shown[or]displayed[or]visible[at random] in [one of]the centre[or]this image[at random][or]The [one of]image[or]picture[or]page[at random] [one of]shows[or]displays[at random] [a photo model][at random]. [The photo model] is wearing [garbs].”;

The main room is a room. The fashion magazine is a magazine in the main room.

The current photo is a part of the fashion magazine. It is a scenery photo.

Instead of doing something with the current photo when the fashion magazine is closed: say “[The fashion magazine] is closed.”.

Instead of doing something other than examining with the current photo: say “[The current photo] is just a picture.”.

The photo model is a pictured woman in the current photo.
Understand “model”, “displayed woman” or “woman” as the photo model.

To change (M - a model) in (L - a list of things):
let garbs be the list of things worn by M;
repeat with cloth running through garbs:
now the cloth is nowhere;
Repeat with cloth running through L:
If M is not wearing cloth:
Now M is wearing cloth;[/code]

Not entirely perfect yet, but this seems the right track.